Sfoglia il codice sorgente

Merge branch 'master' of http://192.168.0.115:3000/bill/traffic-laser

bill 2 anni fa
parent
commit
9c69f20c6f

+ 45 - 26
public/static/lib/potree/potree.js

@@ -73160,6 +73160,8 @@ void main()
 	            visiMap.set(e,e.visible);
 	            e.visible = Potree.Utils.getObjVisiByReason(e, 'datasetSelection'); //先将隐藏的点云显示
 	            if(!e.visible)return
+	             
+	            
 	            size.set(e, e.temp.pointSize);    
 	            sizeType = e.material.pointSizeType;  
 	            e.material.pointSizeType = Potree.config.material.pointSizeType; 
@@ -73916,7 +73918,7 @@ void main()
 				priorityQueue.push({pointcloud: i, node: pointcloud.root, weight: Number.MAX_VALUE});
 			}  */    
 	       
-			if (pointcloud.visible || !pointcloud.hasDepthTex && pointcloud.unvisibleReasons && pointcloud.unvisibleReasons.length == 1 && pointcloud.unvisibleReasons[0].reason == 'displayMode'   &&  pointcloud.root !== null) {//改 visible -> 
+			if (pointcloud.visible || /* !pointcloud.hasDepthTex && */ pointcloud.unvisibleReasons && pointcloud.unvisibleReasons.length == 1 && pointcloud.unvisibleReasons[0].reason == 'displayMode'   &&  pointcloud.root !== null) {//改 visible -> 
 	            priorityQueue.push({pointcloud: i, node: pointcloud.root, weight: Number.MAX_VALUE});
 	        }else {
 	            continue
@@ -74014,7 +74016,7 @@ void main()
 		let pointcloudTransformVersion = Potree._pointcloudTransformVersion;
 		for(let pointcloud of pointclouds){
 
-			if(pointcloud.hasDepthTex ? !pointcloud.visible : !Potree.Utils.getObjVisiByReason(pointcloud, 'datasetSelection')){//改 visible ->  
+			if(/* pointcloud.hasDepthTex ? !pointcloud.visible : */ !Potree.Utils.getObjVisiByReason(pointcloud, 'datasetSelection')){//改 visible ->   这一版的深度图不准,就只用在贴图里,pick时需要点云,所以要一直有, 否则但pick时显示的话visibleNodes只能加载出一点点
 				continue;
 			} 
 	        
@@ -82494,13 +82496,12 @@ void main()
 	        
 	    }
 	    
-	    focus(){  
-	    
+	    focus({dontMoveCamera=false}={}){  
 	    
-	        let dontChangeCamDir = viewer.mainViewport.camera.type == 'OrthographicCamera'; /* && math.closeTo( viewer.mainViewport.view.pitch , -1.57079632)  */ // 不改角度
-	    
-	        viewer.focusOnObject(this, 'measure', null, {dontChangeCamDir});
-	        
+	        if(!dontMoveCamera){
+	            let dontChangeCamDir = viewer.mainViewport.camera.type == 'OrthographicCamera'; /* && math.closeTo( viewer.mainViewport.view.pitch , -1.57079632)  */ // 不改角度
+	            viewer.focusOnObject(this, 'measure', null, {dontChangeCamDir});
+	        }
 	        if(this.clickSelected)return
 	        this.setSelected(true, 'focus');
 	        this.dispatchEvent({type:'selected', state:true});
@@ -83730,10 +83731,14 @@ void main()
 	         
 	            if(ifAtWrongPlace(e))return  
 	            if(e.clickElement || e.drag.object)return  //如点击label时focusOnObject, 或拖拽marker
-	             
-	            
+	              
 	            if(e.button === MOUSE.RIGHT )return  
 	            
+	            
+	            if(e.type == 'global_touchstart' && e.hoveredElement && e.hoveredElement.object.parent instanceof Measure$1 ){
+	                return //点到测量线时要focus测量线而不是画新线
+	            }
+	            
 	            if(isMobile){
 	                viewer.controls.setEnable(false);
 	            }
@@ -89837,16 +89842,16 @@ void main()
 	            && viewer.images360.currentPano.pointcloud.hasDepthTex && viewport == viewer.mainViewport && !usePointcloud; 
 	        
 	        
-	        if(canUseDepthTex)getByDepthTex();
-	        else getByCloud(); 
-	        /* if(canUseDepthTex && !this.isMeasuring){
-	            getByDepthTex()
-	        }else{
-	            getByCloud() 
+	        /* if(canUseDepthTex)getByDepthTex()
+	        else getByCloud()  */
+	        if(canUseDepthTex && !this.isMeasuring){
+	            getByDepthTex();
+	        }else {
+	            getByCloud(); 
 	            if(!intersectPoint && canUseDepthTex  ){  //若在测量,先尝试点云,再用全景 //后来发现有深度图的点云全景visibleNode为空,pick不到的
-	                getByDepthTex()
+	                getByDepthTex();
 	            }
-	        }  */ 
+	        }  
 	        
 	        
 	                   
@@ -91857,10 +91862,11 @@ void main()
 	            
 	            
 	            viewer.images360.addEventListener('beginChangeMode',(e)=>{
-	                if(e.mode == 'showPanos')this.switchView('perspective',{}, ()=>{
+	                if(e.mode == 'showPanos'){ 
+	                    this.switchView('perspective',{}, ()=>{
 	                      Potree.settings.displayMode = viewer.images360.latestRequestMode;
-	                });
-	                
+	                    });
+	                }
 	            }); 
 	            
 	            
@@ -91920,6 +91926,7 @@ void main()
 	    switchView(type, {yaw, pitch, dir}={}, done){
 	        if(viewer.mainViewport.view.isFlying())return
 	        let view = viewer.mainViewport.view;
+	        let oldlastView = this.lastView; 
 	        this.lastView = view.clone();
 	        if(viewer.mainViewport.camera.type == 'OrthographicCamera'){
 	            this.lastView.isOrtho = true;
@@ -91962,6 +91969,12 @@ void main()
 	        }else {
 	            
 	            if(viewer.mainViewport.camera == viewer.scene.cameraO){
+	                 
+	                return this.switchView2(oldlastView, done)
+	                
+	                
+	                
+	                
 	                //viewer.scene.cameraP.position.copy(viewer.mainViewport.camera.position)
 	                //viewer.scene.cameraP.quaternion.copy(viewer.mainViewport.camera.quaternion)
 	                viewer.mainViewport.camera = viewer.scene.cameraP;
@@ -91978,6 +91991,11 @@ void main()
 	                
 	                let position = new Vector3().copy(viewer.mainViewport.shiftTarget).sub(view.direction.clone().multiplyScalar(dis)); 
 	                //view.position.copy(viewer.mainViewport.shiftTarget).sub(view.direction.clone().multiplyScalar(dis)); 
+	                
+	                 
+	                
+	                 
+	                 
 	                this.controls.setEnable(true);
 	                //viewer.dispatchEvent('leaveTopView')
 	                console.log('变回透视');
@@ -91998,7 +92016,7 @@ void main()
 	    
 	    
 	    
-	    switchView2(viewInfo){ //直接输入view改变
+	    switchView2(viewInfo, done){ //直接输入view改变
 	        
 	        let view = viewer.mainViewport.view;
 	        let startCamera, endCamera; 
@@ -92014,9 +92032,9 @@ void main()
 	                view.moveOrthoCamera(viewer.mainViewport,  {endPosition:viewInfo.position,
 	                    endPitch: viewInfo.pitch, endYaw: viewInfo.yaw ,  zoom: viewInfo.zoom, 
 	                    callback:()=>{ 
-	                        
+	                        done && done();
 	                    }, 
-	                }, 500);
+	                }, 800);
 	            }
 	        }else {
 	            if(viewer.mainViewport.camera == viewer.scene.cameraO){
@@ -92030,7 +92048,7 @@ void main()
 	                    callback:()=>{ 
 	                       
 	                    }, 
-	                }, 500);
+	                }, 800);
 	            }
 	            
 	        }
@@ -92051,8 +92069,9 @@ void main()
 	                    }else {
 	                        viewer.dispatchEvent({type:'viewChanged', name:'perspective' });
 	                    }
+	                    done && done();
 	                }, 
-	            }, 500);
+	            }, 800);
 	        } 
 	        
 	    }

File diff suppressed because it is too large
+ 1 - 1
public/static/lib/potree/potree.js.map


File diff suppressed because it is too large
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 2 - 0
src/graphic/Controls/AddPoint.js

@@ -12,6 +12,7 @@ import VectorType from "../enum/VectorType";
 import Constant from "../Constant";
 import { listenLayer } from "../ListenLayer";
 import { textService } from "../Service/TextService";
+import { uiService } from "../Service/UIService";
 
 export default class AddPoint {
   constructor() {
@@ -96,6 +97,7 @@ export default class AddPoint {
       newPoint.linkedTextId = textVector.vectorId;
       textVector.linkedPointId = newPoint.vectorId;
     }
+    uiService.setSelectPointCategory(VectorCategory.Point.NormalPoint);
     listenLayer.clear();
     return newPoint;
   }

+ 13 - 2
src/graphic/Controls/LocationModeControl.js

@@ -37,11 +37,19 @@ export default class LocationModeControl {
     let startPoint = dataService.getPoint(baseLine.startId);
     let endPoint = dataService.getPoint(baseLine.endId);
 
+    fixPoint.linkedBasePointId = basePoint.vectorId;
+
     let baseLineGeometry = mathUtil.createLine1(startPoint, endPoint);
     let vLine = mathUtil.getVerticalLine(baseLineGeometry, fixPoint);
-    let join = mathUtil.getJoinLinePoint(basePoint, vLine);
+    // let join = mathUtil.getJoinLinePoint(basePoint, vLine);
+    // join = pointService.create(join);
+    // join.setLocationMode(Constant.angleLocationMode);
+    let join = mathUtil.getIntersectionPoint(baseLineGeometry, vLine); //固定点到基准线的垂直线与基准线的交点
     join = pointService.create(join);
     join.setLocationMode(Constant.angleLocationMode);
+    join.setCategory(VectorCategory.Point.TestBasePoint);
+    //join.setCategory(VectorCategory.Line.LocationLineByFixPoint);
+    //fixPoint.linkedTestPointId = join.vectorId;
 
     let locationLineByFixPoint = lineService.createByPointId(
       fixPointId,
@@ -50,10 +58,13 @@ export default class LocationModeControl {
     );
     locationLineByFixPoint.setLocationMode(Constant.angleLocationMode);
 
-    let locationLineByBasePoint = mathUtil.getVerticalLine(vLine, basePoint);
+    let locationLineByBasePoint = mathUtil.getVerticalLine(vLine, basePoint); //基准点1条垂直线的垂直线
     join = mathUtil.getIntersectionPoint(locationLineByBasePoint, vLine);
     join = pointService.create(join);
     join.setLocationMode(Constant.angleLocationMode);
+    join.setCategory(VectorCategory.Point.TestBasePoint);
+    //join.linkedBasePointId = basePointId;
+
     locationLineByBasePoint = lineService.createByPointId(
       basePointId,
       join.vectorId,

+ 73 - 2
src/graphic/Controls/MoveLine.js

@@ -1,4 +1,6 @@
 import Constant from "../Constant";
+import Settings from "../Settings";
+
 import { dataService } from "../Service/DataService";
 import { lineService } from "../Service/LineService";
 import { pointService } from "../Service/PointService";
@@ -93,10 +95,14 @@ export default class MoveLine {
     let startPoint = dataService.getPoint(line.startId);
     let endPoint = dataService.getPoint(line.endId);
 
+    let baseLine = dataService.getLine(Settings.baseLineId);
+    let baseStartPoint = dataService.getPoint(baseLine.startId);
+    let baseEndPoint = dataService.getPoint(baseLine.endId);
+    baseLine = mathUtil.createLine1(baseStartPoint, baseEndPoint);
+
     //垂直移动,直角定位法只支持定位线的拖拽
     if (
-      (line.getCategory() == VectorCategory.Line.LocationLineByFixPoint ||
-        line.getCategory() == VectorCategory.Line.LocationLineByBasePoint) &&
+      line.getCategory() == VectorCategory.Line.LocationLineByBasePoint &&
       line.getLocationMode() == Constant.angleLocationMode
     ) {
       let point1 = {
@@ -157,6 +163,71 @@ export default class MoveLine {
       point2 = mathUtil.getJoinLinePoint(endPoint, lineGeometry);
       endPoint.x = point2.x;
       endPoint.y = point2.y;
+    } else if (
+      line.getCategory() == VectorCategory.Line.LocationLineByFixPoint &&
+      line.getLocationMode() == Constant.angleLocationMode
+    ) {
+      let point1 = {
+        x: startPoint.x + dx,
+        y: startPoint.y + dy,
+      };
+      let point2 = {
+        x: endPoint.x + dx,
+        y: endPoint.y + dy,
+      };
+      let lineGeometry = mathUtil.createLine1(point1, point2);
+      point1 = mathUtil.getJoinLinePoint(startPoint, lineGeometry);
+      if (startPoint.getCategory() == VectorCategory.Point.FixPoint) {
+        //达到一定距离才能移动
+        if (mathUtil.getDistance(startPoint, point1) < Constant.minAdsorbPix) {
+          return false;
+        }
+        let newStartPoint = pointService.create(point1);
+        let extendedPositionLine = lineService.createByPointId(
+          startPoint.vectorId,
+          newStartPoint.vectorId,
+          VectorCategory.Line.ExtendedPositionLine
+        );
+        extendedPositionLine.setLocationMode(Constant.angleLocationMode);
+        dataService.deletePointParent(startPoint.vectorId, lineId);
+        line.startId = newStartPoint.vectorId;
+        newStartPoint.setPointParent(line.vectorId, "start");
+        newStartPoint.setCategory(VectorCategory.Point.TestBasePoint);
+        let join = mathUtil.getIntersectionPoint(lineGeometry, baseLine);
+        mathUtil.clonePoint(endPoint, join);
+      } else {
+        let extendedPositionLine = mathUtil.createLine3(baseLine, startPoint);
+        let join = mathUtil.getIntersectionPoint(
+          lineGeometry,
+          extendedPositionLine
+        );
+        mathUtil.clonePoint(startPoint, join);
+        join = mathUtil.getIntersectionPoint(lineGeometry, baseLine);
+        mathUtil.clonePoint(endPoint, join);
+
+        let parent = startPoint.getParent();
+        for (let key in parent) {
+          if (key == lineId) {
+            continue;
+          } else {
+            extendedPositionLine = dataService.getLine(key);
+          }
+        }
+        startPoint = dataService.getPoint(extendedPositionLine.startId);
+        if (mathUtil.getDistance(point1, startPoint) < Constant.minAdsorbPix) {
+          let otherPointId = extendedPositionLine.getOtherPointId(
+            startPoint.vectorId
+          );
+          let otherPoint = dataService.getPoint(otherPointId);
+          if (startPoint.getCategory() == VectorCategory.Point.FixPoint) {
+            dataService.deleteLine(extendedPositionLine.vectorId);
+            dataService.deletePoint(otherPoint.vectorId);
+            line.startId = startPoint.vectorId;
+          }
+          join = mathUtil.getJoinLinePoint(startPoint, baseLine);
+          mathUtil.clonePoint(endPoint, join);
+        }
+      }
     } else {
       //综合定位和垂线定位,拖动基准线更新位置
       //缺

+ 108 - 29
src/graphic/Controls/MovePoint.js

@@ -10,30 +10,42 @@ import { mathUtil } from "../Util/MathUtil";
 export default class MovePoint {
   constructor() {}
 
+  // movePoint(position, pointId) {
+  //   let point = dataService.getPoint(pointId);
+  //   point.x = position.x;
+  //   point.y = position.y;
+  //   if (point.getCategory() == VectorCategory.Point.TestPoint) {
+  //     this.updatePositionByTestPoint(pointId);
+  //   } else if (point.getCategory() == VectorCategory.Point.BasePoint) {
+  //     this.updateBasePoint(pointId);
+  //   } else {
+  //     let parent = point.getParent();
+  //     for (let key in parent) {
+  //       let line = dataService.getLine(key);
+  //       line.setValue(null);
+  //       //拖拽的点是基准线
+  //       if (line.category == VectorCategory.Line.BaseLine) {
+  //         let points = dataService.getPoints();
+  //         for (let key in points) {
+  //           let testPoint = dataService.getPoint(key);
+  //           if (testPoint.category == VectorCategory.Point.TestPoint) {
+  //             this.updatePositionByTestPoint(key);
+  //           }
+  //         }
+  //       }
+  //     }
+  //   }
+  // }
+
   movePoint(position, pointId) {
     let point = dataService.getPoint(pointId);
-    point.x = position.x;
-    point.y = position.y;
-    if (point.getCategory() == VectorCategory.Point.TestPoint) {
-      this.updatePositionByTestPoint(pointId);
-    } else if (point.getCategory() == VectorCategory.Point.BasePoint) {
-      this.updateBasePoint(pointId);
+    if (point.getCategory() == VectorCategory.Point.BasePoint) {
+      this.updateBasePoint(position, pointId);
+    } else if (point.getCategory() == VectorCategory.Point.FixPoint) {
+      this.updateFixPoint(position, pointId);
     } else {
-      let parent = point.getParent();
-      for (let key in parent) {
-        let line = dataService.getLine(key);
-        line.setValue(null);
-        //拖拽的点是基准线
-        if (line.category == VectorCategory.Line.BaseLine) {
-          let points = dataService.getPoints();
-          for (let key in points) {
-            let testPoint = dataService.getPoint(key);
-            if (testPoint.category == VectorCategory.Point.TestPoint) {
-              this.updatePositionByTestPoint(key);
-            }
-          }
-        }
-      }
+      point.x = position.x;
+      point.y = position.y;
     }
   }
 
@@ -213,17 +225,84 @@ export default class MovePoint {
     mathUtil.clonePoint(testBasePoint, join);
   }
 
-  updateBasePoint(basePointId) {
-    let points = dataService.getPoints();
-    for (let key in points) {
-      let point = dataService.getPoint(key);
-      if (
-        point.getCategory() == VectorCategory.Point.TestPoint &&
-        point.getLinkedBasePointId() == basePointId
+  // updateBasePoint(basePointId) {
+  //   let points = dataService.getPoints();
+  //   for (let key in points) {
+  //     let point = dataService.getPoint(key);
+  //     if (
+  //       point.getCategory() == VectorCategory.Point.TestPoint &&
+  //       point.getLinkedBasePointId() == basePointId
+  //     ) {
+  //       this.updatePositionByTestPoint(key);
+  //     }
+  //   }
+  // }
+
+  updateBasePoint(position, basePointId) {
+    let lineGeometry = dataService.getLine(Settings.baseLineId);
+    let startPoint = dataService.getPoint(lineGeometry.startId);
+    let endPoint = dataService.getPoint(lineGeometry.endId);
+    lineGeometry = mathUtil.createLine1(startPoint, endPoint);
+    let basePoint = dataService.getPoint(basePointId);
+    let parent = basePoint.getParent();
+    for (let key in parent) {
+      let line = dataService.getLine(key);
+      if (line.getCategory() == VectorCategory.Line.LocationLineByBasePoint) {
+        let otherPointId = line.getOtherPointId(basePointId);
+        let otherPoint = dataService.getPoint(otherPointId);
+        let otherLine = mathUtil.getLineForPoint(lineGeometry, otherPoint);
+        line = mathUtil.createLine3(lineGeometry, position);
+        let join = mathUtil.getIntersectionPoint(line, otherLine);
+        mathUtil.clonePoint(otherPoint, join);
+        mathUtil.clonePoint(basePoint, position);
+      } else if (
+        line.getCategory() == VectorCategory.Line.ExtendedPositionLine
       ) {
-        this.updatePositionByTestPoint(key);
+        let otherPointId = line.getOtherPointId(basePointId);
+        let otherPoint = dataService.getPoint(otherPointId);
+        let otherLine = mathUtil.createLine3(lineGeometry, otherPoint);
+        let join = mathUtil.getJoinLinePoint(position, otherLine);
+        mathUtil.clonePoint(otherPoint, join);
+        mathUtil.clonePoint(basePoint, position);
+      }
+    }
+  }
+
+  updateFixPoint(position, fixPointId) {
+    let fixPoint = dataService.getPoint(fixPointId);
+    let basePoint = dataService.getPoint(fixPoint.linkedBasePointId);
+    let baseLine = dataService.getLine(Settings.baseLineId);
+    let startPoint = dataService.getPoint(baseLine.startId);
+    let endPoint = dataService.getPoint(baseLine.endId);
+
+    let baseLineGeometry = mathUtil.createLine1(startPoint, endPoint);
+    let vLine = mathUtil.getVerticalLine(baseLineGeometry, position);
+    let join = mathUtil.getIntersectionPoint(baseLineGeometry, vLine);
+
+    let parent = fixPoint.getParent();
+    for (let key in parent) {
+      let line = dataService.getLine(key);
+      if (line.getCategory() == VectorCategory.Line.LocationLineByFixPoint) {
+        let otherPointId = line.getOtherPointId(fixPointId);
+        let otherPoint = dataService.getPoint(otherPointId);
+        mathUtil.clonePoint(otherPoint, join);
+      } else if (line.getCategory() == VectorCategory.Line.GuideLocationLine) {
+        let otherPointId = line.getOtherPointId(fixPointId);
+        let otherPoint = dataService.getPoint(otherPointId);
+        let line2 = mathUtil.createLine3(baseLineGeometry, otherPoint);
+        join = mathUtil.getIntersectionPoint(line2, vLine);
+        mathUtil.clonePoint(otherPoint, join);
+      } else if (
+        line.getCategory() == VectorCategory.Line.ExtendedPositionLine
+      ) {
+        let otherPointId = line.getOtherPointId(fixPointId);
+        let otherPoint = dataService.getPoint(otherPointId);
+        let line2 = mathUtil.createLine3(baseLineGeometry, fixPoint);
+        join = mathUtil.getJoinLinePoint(otherPoint, line2);
+        mathUtil.clonePoint(otherPoint, join);
       }
     }
+    mathUtil.clonePoint(fixPoint, position);
   }
 
   /*****************************************************************************曲线上的点********************************************************************************/

+ 5 - 0
src/graphic/Controls/UIControl.js

@@ -30,6 +30,7 @@ import Message from "@/components/base/components/message/message.vue";
 import { pointService } from "../Service/PointService.js";
 import Settings from "../Settings.js";
 import { addPoint } from "./AddPoint.js";
+import { locationModeControl } from "./LocationModeControl.js";
 import { curveRoadPointService } from "../Service/CurveRoadPointService.js";
 import { roadService } from "../Service/RoadService.js";
 import { curveRoadService } from "../Service/CurveRoadService.js";
@@ -115,6 +116,10 @@ export default class UIControl {
           stateService.setEventName(LayerEvents.AddRoadTemplate);
         } else if (uiService.isBelongRoadStructure(selectUI)) {
           stateService.setEventName(LayerEvents.AddRoadStructure);
+        } else if (selectUI == Constant.angleLocationMode) {
+          locationModeControl.setAngle();
+          this.layer.history.save();
+          this.layer.renderer.autoRedraw();
         }
       }
     }

+ 10 - 0
src/graphic/Geometry/Line.js

@@ -37,4 +37,14 @@ export default class Line extends Geometry {
       return null;
     }
   }
+
+  getOtherPointId(pointId) {
+    if (this.startId == pointId) {
+      return this.endId;
+    } else if (this.endId == pointId) {
+      return this.startId;
+    } else {
+      return null;
+    }
+  }
 }

+ 1 - 1
src/graphic/Layer.js

@@ -835,7 +835,7 @@ export default class Layer {
           point = dataService.getPoint(draggingItem.vectorId);
           listenLayer.start(position, {
             exceptPointId: draggingItem.vectorId,
-            exceptLineId: point.parent,
+            exceptLineIds: point.parent,
           });
 
           // if (listenLayer.modifyPoint) {  //原本是这样的,不知用途,下面修改为了修复拖动点经过放大镜导致NaN或者错位

+ 21 - 3
src/graphic/ListenLayer.js

@@ -62,7 +62,8 @@ export default class ListenLayer {
     );
     selectInfo.pointInfo = this.isSelectPoint(
       position,
-      exceptVectorIds.exceptPointId
+      exceptVectorIds.exceptPointId,
+      exceptVectorIds.exceptLineIds
     );
     selectInfo.lineInfo = this.isSelectLine(
       position,
@@ -221,17 +222,32 @@ export default class ListenLayer {
     return curveLineInfo;
   }
 
-  isSelectPoint(position, exceptPointId) {
+  isSelectPoint(position, exceptPointId, exceptLineIds) {
     let pointInfo = {
       pointId: null,
       type: null,
       distance: null,
     };
 
+    let exceptPointIds = [];
+    if (exceptPointId) {
+      exceptPointIds.push(exceptPointId);
+    }
+    if (exceptLineIds) {
+      for (let key in exceptLineIds) {
+        let exceptLine = dataService.getLine(key);
+        exceptPointIds.push(exceptLine.startId);
+        exceptPointIds.push(exceptLine.endId);
+      }
+    }
+
     let seqInfo = {};
     const points = dataService.getPoints();
     for (const pointId in points) {
-      if (pointId == exceptPointId) {
+      // if (pointId == exceptPointId) {
+      //   continue;
+      // }
+      if (exceptPointIds.indexOf(pointId) > -1) {
         continue;
       }
       const point = dataService.getPoint(pointId);
@@ -323,6 +339,8 @@ export default class ListenLayer {
 
       const line = dataService.getLine(lineId);
       if (
+        line.getCategory() == VectorCategory.Line.ExtendedPositionLine ||
+        line.getCategory() == VectorCategory.Line.GuideLocationLine ||
         line.getCategory() == VectorCategory.Line.GuidePositionLine ||
         (line.getCategory() == VectorCategory.Line.PositionLine &&
           line.getLocationMode() != Constant.angleLocationMode)

+ 2 - 0
src/graphic/Load.js

@@ -241,6 +241,7 @@ export default class Load {
             newEdge.setWeight(edge.weight);
           }
           newEdge.setLineWidth(edge.lineWidth);
+          newEdge.setParent(edge.parent);
         }
       }
 
@@ -265,6 +266,7 @@ export default class Load {
           );
           curveRoadEdge.setStyle(curveRoadEdgeData.style);
           curveRoadEdge.setWeight(curveRoadEdgeData.weight);
+          curveRoadEdge.setParent(curveRoadEdgeData.parent);
           curveEdgeService.setCurves(curveRoadEdge);
         }
       }

+ 7 - 9
src/graphic/Service/DataService.js

@@ -138,15 +138,13 @@ export class DataService {
       return;
     }
     let start = this.getPoint(line.startId);
-    if (start && start.getCategory() != VectorCategory.Point.BasePoint) {
-      let startParent = start.getParent();
-      delete startParent[lineId];
-      if (
-        Object.keys(startParent).length == 0 &&
-        start.getCategory() != VectorCategory.Point.BasePoint
-      ) {
-        this.deletePoint(line.startId);
-      }
+    let startParent = start.getParent();
+    delete startParent[lineId];
+    if (
+      Object.keys(startParent).length == 0 &&
+      start.getCategory() != VectorCategory.Point.BasePoint
+    ) {
+      this.deletePoint(line.startId);
     }
 
     let end = this.getPoint(line.endId);

+ 21 - 13
src/graphic/Service/UIService.js

@@ -93,19 +93,27 @@ export default class UIService {
   }
 
   isBelongPoint(ui) {
-    if (ui == UIEvents.NormalLocationMode) {
-      this.setSelectPointCategory(VectorCategory.Point.TestPoint);
-      this.setSelectLocationMode(Constant.normalLocationMode);
-      return true;
-    } else if (ui == UIEvents.AngleLocationMode) {
-      this.setSelectPointCategory(VectorCategory.Point.TestPoint);
-      this.setSelectLocationMode(Constant.angleLocationMode);
-      return true;
-    } else if (ui == UIEvents.AllLocationMode) {
-      this.setSelectPointCategory(VectorCategory.Point.TestPoint);
-      this.setSelectLocationMode(Constant.allLocationMode);
-      return true;
-    } else if (ui == UIEvents.BasePoint) {
+    // if (ui == UIEvents.NormalLocationMode) {
+    //   this.setSelectPointCategory(VectorCategory.Point.TestPoint);
+    //   this.setSelectLocationMode(Constant.normalLocationMode);
+    //   return true;
+    // } else if (ui == UIEvents.AngleLocationMode) {
+    //   this.setSelectPointCategory(VectorCategory.Point.TestPoint);
+    //   this.setSelectLocationMode(Constant.angleLocationMode);
+    //   return true;
+    // } else if (ui == UIEvents.AllLocationMode) {
+    //   this.setSelectPointCategory(VectorCategory.Point.TestPoint);
+    //   this.setSelectLocationMode(Constant.allLocationMode);
+    //   return true;
+    // } else if (ui == UIEvents.BasePoint) {
+    //   this.setSelectPointCategory(VectorCategory.Point.BasePoint);
+    //   this.setSelectLocationMode(null);
+    //   return true;
+    // } else if (ui == UIEvents.FixPoint) {
+    //   this.setSelectPointCategory(VectorCategory.Point.FixPoint);
+    //   return true;
+    // }
+    if (ui == UIEvents.BasePoint) {
       this.setSelectPointCategory(VectorCategory.Point.BasePoint);
       this.setSelectLocationMode(null);
       return true;

+ 0 - 2
src/graphic/Util/MathUtil.js

@@ -384,11 +384,9 @@ export default class MathUtil {
     let parameter = {};
     if (line.a == 0 || typeof line.a == "undefined") {
       if (line.hasOwnProperty("x")) {
-        parameter.x = line.x;
         parameter.y = point.y;
       } else if (line.hasOwnProperty("y")) {
         parameter.x = point.x;
-        parameter.y = line.y;
       }
     } else {
       parameter.a = -1 / line.a;

+ 1 - 1
src/graphic/enum/VectorCategory.js

@@ -16,7 +16,7 @@ const VectorCategory = {
     //重做定位
     GuideLocationLine: "GuideLocationLine", //定位辅助线
     LocationLineByFixPoint: "LocationLineByFixPoint", //经过固定点的定位线
-    LocationLineByBasePoint: "LocationLineByFixPoint", //经过基础点的定位线
+    LocationLineByBasePoint: "LocationLineByBasePoint", //经过基础点的定位线
     LocationLineByFixPointToFixPoint: "LocationLineByFixPointToFixPoint", //经过固定点到固定点的定位线,综合定位法
     LocationLineByFixPointToBasePoint: "LocationLineByFixPointToBasePoint", //经过固定点到基础点的定位线,综合定位法
   },

+ 2 - 2
src/sdk/laser/core/enter.js

@@ -356,10 +356,10 @@ var enter = ({
             /* highlight: (isHight) => {
                 measure.setSelected(isHight, "byList");
             }, */
-            selected: (state) => {
+            selected: (state, dontMoveCamera ) => {
                 //measure.setSelected(state, "byList");
                 if(state){
-                    measure.focus()
+                    measure.focus({dontMoveCamera})
                 }else{
                     measure.dispatchEvent('cancelSelect')
                 }