|
@@ -1272,15 +1272,24 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes }) => {
|
|
|
info.points_datasets = props.points.map(e=>e.position)
|
|
|
path = viewer.measuringTool.createMeasureFromData(info);
|
|
|
|
|
|
+ if(props.line.position) {
|
|
|
+ let pos = Potree.Utils.datasetPosTransform({toDataset:true, position: props.line.position, datasetId: props.line.modelId })
|
|
|
+ path.titleLabel.parent.position.copy(pos)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- path.addEventListener('markerSelect',(e)=>{
|
|
|
- console.log('markerSelect', e.cancel ? -1 : path.markers.indexOf(e.marker) )
|
|
|
+ path.addEventListener('markerSelect',(e)=>{
|
|
|
bus.emit('activePoint', e.cancel ? -1 : path.markers.indexOf(e.marker) )
|
|
|
})
|
|
|
-
|
|
|
+ path.addEventListener('titlePosChanged',(e)=>{
|
|
|
+ bus.emit('linePositionChange', {
|
|
|
+ modelId: e.root.dataset_id,
|
|
|
+ pos: Potree.Utils.datasetPosTransform({toDataset:true, position: path.titleLabel.parent.position.clone(), datasetId: e.root.dataset_id })
|
|
|
+ })
|
|
|
+
|
|
|
+ })
|
|
|
|
|
|
|
|
|
let funs = getMeasureFunction(path, bus)
|
|
@@ -1311,7 +1320,11 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes }) => {
|
|
|
changeLine({width,color,altitudeAboveGround}){
|
|
|
path.setPathWidth(width)
|
|
|
path.setPathColor(color)
|
|
|
+ },
|
|
|
+ changeVisibilityRange(far){
|
|
|
+ path.setFadeFar(far== -1 ? null : far)
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
return functions
|
|
|
|