jinx 1 éve
szülő
commit
5961572272
3 módosított fájl, 138 hozzáadás és 470 törlés
  1. 27 92
      src/graphic/Controls/AddRoad.js
  2. 3 1
      src/graphic/Layer.js
  3. 108 377
      src/graphic/ListenLayer.js

+ 27 - 92
src/graphic/Controls/AddRoad.js

@@ -36,6 +36,7 @@ export default class AddRoad {
         linkedRoadPointId: pointInfo.linkedRoadPointId,
         linkedRoadId: pointInfo.linkedRoadId,
       };
+      // console.error(this.endInfo);
     }
   }
 
@@ -44,22 +45,17 @@ export default class AddRoad {
     let flag = this.needDelete();
     if (flag) {
       return null;
-    } else if (
-      this.startInfo.linkedRoadId &&
-      this.endInfo.linkedRoadId &&
-      this.startInfo.linkedRoadId == this.endInfo.linkedRoadId
-    ) {
+    } else if (this.startInfo.linkedRoadId && this.endInfo.linkedRoadId && this.startInfo.linkedRoadId == this.endInfo.linkedRoadId) {
       return null;
     }
 
     let joinInfos = this.getJoinsForRoads();
     let splitPointIds = this.splitAllJoins(joinInfos);
+    console.error(splitPointIds)
+
     this.creatNewRoads(splitPointIds);
     this.canAdd = false;
-    this.updateStart(
-      this.endInfo.position,
-      splitPointIds[splitPointIds.length - 1]
-    );
+    this.updateStart(this.endInfo.position, splitPointIds[splitPointIds.length - 1]);
 
     let hasComputerRoadIds = [];
     for (let i = 0; i < splitPointIds.length; ++i) {
@@ -74,13 +70,14 @@ export default class AddRoad {
         }
       }
     }
- 
+
     listenLayer.clear();
     this.clear();
   }
 
   //开始新建公路,可能是多个
   creatNewRoads(splitPointIds) {
+
     for (let i = 0; i < splitPointIds.length - 1; ++i) {
       let pointId1 = splitPointIds[i];
       let pointId2 = splitPointIds[i + 1];
@@ -94,21 +91,12 @@ export default class AddRoad {
   }
 
   canAddRoadForEnd(endPt) {
-    if (
-      listenLayer.modifyPoint &&
-      listenLayer.modifyPoint.hasOwnProperty("x")
-    ) {
-      if (
-        mathUtil.getDistance(this.startInfo.position, listenLayer.modifyPoint) <
-        Constant.minAdsorbPix
-      ) {
+    if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
+      if (mathUtil.getDistance(this.startInfo.position, listenLayer.modifyPoint) < Constant.minAdsorbPix) {
         return false;
       }
     } else {
-      if (
-        mathUtil.getDistance(this.startInfo.position, endPt) <
-        Constant.minAdsorbPix
-      ) {
+      if (mathUtil.getDistance(this.startInfo.position, endPt) < Constant.minAdsorbPix) {
         return false;
       }
     }
@@ -157,25 +145,16 @@ export default class AddRoad {
       });
     }
 
-    const line = mathUtil.createLine1(
-      this.startInfo.position,
-      this.endInfo.position
-    );
+    const line = mathUtil.createLine1(this.startInfo.position, this.endInfo.position);
     for (let key in roads) {
       if (this.startInfo.linkedRoadId && this.startInfo.linkedRoadId == key) {
         continue;
-      } else if (
-        this.endInfo.linkedRoadId &&
-        this.endInfo.linkedRoadId == key
-      ) {
+      } else if (this.endInfo.linkedRoadId && this.endInfo.linkedRoadId == key) {
         continue;
       }
 
       let road = roads[key];
-      if (
-        hasExitPointIds.indexOf(road.startId) > -1 ||
-        hasExitPointIds.indexOf(road.endId) > -1
-      ) {
+      if (hasExitPointIds.indexOf(road.startId) > -1 || hasExitPointIds.indexOf(road.endId) > -1) {
         continue;
       }
 
@@ -186,15 +165,7 @@ export default class AddRoad {
       if (hasComputerPointIds.indexOf(road.startId) < 0) {
         hasComputerPointIds.push(road.startId);
         const startJoin = mathUtil.getJoinLinePoint(startPoint, line);
-        if (
-          mathUtil.PointInSegment(
-            startJoin,
-            this.startInfo.position,
-            this.endInfo.position,
-            Constant.minAdsorbPix
-          ) &&
-          mathUtil.getDistance(startPoint, startJoin) < Constant.minAdsorbPix
-        ) {
+        if (mathUtil.PointInSegment(startJoin, this.startInfo.position, this.endInfo.position, Constant.minAdsorbPix) && mathUtil.getDistance(startPoint, startJoin) < Constant.minAdsorbPix) {
           result.push({
             join: { x: startJoin.x, y: startJoin.y },
             pointId: road.startId,
@@ -208,15 +179,7 @@ export default class AddRoad {
       if (hasComputerPointIds.indexOf(road.endId) < 0) {
         hasComputerPointIds.push(road.endId);
         const endJoin = mathUtil.getJoinLinePoint(endPoint, line);
-        if (
-          mathUtil.PointInSegment(
-            endJoin,
-            this.startInfo.position,
-            this.endInfo.position,
-            Constant.minAdsorbPix
-          ) &&
-          mathUtil.getDistance(endPoint, endJoin) < Constant.minAdsorbPix
-        ) {
+        if (mathUtil.PointInSegment(endJoin, this.startInfo.position, this.endInfo.position, Constant.minAdsorbPix) && mathUtil.getDistance(endPoint, endJoin) < Constant.minAdsorbPix) {
           result.push({
             join: { x: endJoin.x, y: endJoin.y },
             pointId: road.endId,
@@ -229,16 +192,8 @@ export default class AddRoad {
 
       if (!flag) {
         //不与墙key的端点相交
-        if (
-          hasExitPointIds.indexOf(road.startId) < 0 &&
-          hasExitPointIds.indexOf(road.endId) < 0
-        ) {
-          let join = mathUtil.getIntersectionPoint3(
-            startPoint,
-            endPoint,
-            this.startInfo.position,
-            this.endInfo.position
-          );
+        if (hasExitPointIds.indexOf(road.startId) < 0 && hasExitPointIds.indexOf(road.endId) < 0) {
+          let join = mathUtil.getIntersectionPoint3(startPoint, endPoint, this.startInfo.position, this.endInfo.position);
           if (join) {
             result.push({ join: { x: join.x, y: join.y }, roadId: key });
           }
@@ -252,10 +207,7 @@ export default class AddRoad {
     // 对joinInfos要进行排序
     joinInfos = joinInfos.sort(sortNumber.bind(this));
     function sortNumber(a, b) {
-      return (
-        mathUtil.getDistance(this.startInfo.position, a.join) -
-        mathUtil.getDistance(this.startInfo.position, b.join)
-      );
+      return mathUtil.getDistance(this.startInfo.position, a.join) - mathUtil.getDistance(this.startInfo.position, b.join);
     }
 
     const splitPointIds = [];
@@ -273,16 +225,10 @@ export default class AddRoad {
         const splitPointId = splitPoint.vectorId;
         //可能joinInfos的两个点都在roadId上
         let newRoadId = null;
-        if (
-          joinInfos[i + 1] &&
-          joinInfos[i].roadId == joinInfos[i + 1].roadId
-        ) {
+        if (joinInfos[i + 1] && joinInfos[i].roadId == joinInfos[i + 1].roadId) {
           let road = dataService.getRoad(roadId);
           let startPoint = dataService.getRoadPoint(road.startId);
-          if (
-            mathUtil.getDistance(startPoint, joinInfos[i].join) <
-            mathUtil.getDistance(startPoint, joinInfos[i + 1].join)
-          ) {
+          if (mathUtil.getDistance(startPoint, joinInfos[i].join) < mathUtil.getDistance(startPoint, joinInfos[i + 1].join)) {
             newRoadId = roadService.splitRoad(roadId, splitPointId, "end");
           } else {
             newRoadId = roadService.splitRoad(roadId, splitPointId, "start");
@@ -312,8 +258,10 @@ export default class AddRoad {
   }
 
   setNewRoadPoint(dir, position) {
+
     if (dir == "start") {
       if (listenLayer.modifyPoint) {
+        console.error(position,listenLayer.modifyPoint)
         this.setPointInfo(dir, listenLayer.modifyPoint);
       } else {
         this.setPointInfo(dir, position);
@@ -337,35 +285,22 @@ export default class AddRoad {
       return true;
     } else if (this.startInfo.linkedRoadPointId && this.endInfo.linkedRoadId) {
       let linkedRoad = dataService.getRoad(this.endInfo.linkedRoadId);
-      if (
-        linkedRoad.startId == this.startInfo.linkedRoadPointId ||
-        linkedRoad.endId == this.startInfo.linkedRoadPointId
-      ) {
+      if (linkedRoad.startId == this.startInfo.linkedRoadPointId || linkedRoad.endId == this.startInfo.linkedRoadPointId) {
         return true;
       } else {
         return false;
       }
     } else if (this.startInfo.linkedRoadId && this.endInfo.linkedRoadPointId) {
       let linkedRoad = dataService.getRoad(this.startInfo.linkedRoadId);
-      if (
-        linkedRoad.startId == this.endInfo.linkedRoadPointId ||
-        linkedRoad.endId == this.endInfo.linkedRoadPointId
-      ) {
+      if (linkedRoad.startId == this.endInfo.linkedRoadPointId || linkedRoad.endId == this.endInfo.linkedRoadPointId) {
         return true;
       } else {
         return false;
       }
-    } else if (
-      this.startInfo.linkedRoadPointId &&
-      this.endInfo.linkedRoadPointId
-    ) {
-      let startRoadPoint = dataService.getRoadPoint(
-        this.startInfo.linkedRoadPointId
-      );
+    } else if (this.startInfo.linkedRoadPointId && this.endInfo.linkedRoadPointId) {
+      let startRoadPoint = dataService.getRoadPoint(this.startInfo.linkedRoadPointId);
       let startParent = startRoadPoint.getParent();
-      let endRoadPoint = dataService.getRoadPoint(
-        this.endInfo.linkedRoadPointId
-      );
+      let endRoadPoint = dataService.getRoadPoint(this.endInfo.linkedRoadPointId);
       let endParent = endRoadPoint.getParent();
       for (let key in startParent) {
         if (endParent.hasOwnProperty(key)) {

+ 3 - 1
src/graphic/Layer.js

@@ -542,7 +542,6 @@ export default class Layer {
         //   addRoad.startInfo.linkedRoadId
         //   addRoad.startInfo.linkedRoadPointId
         // });
-
         if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
@@ -982,6 +981,9 @@ export default class Layer {
             roadEdge.initRoadSide();
           }
         }
+
+     
+
         this.uiControl.confirmEntry(); //不能连续创建道路
         break;
       case LayerEvents.AddingLine:

+ 108 - 377
src/graphic/ListenLayer.js

@@ -39,71 +39,31 @@ export default class ListenLayer {
   }
    * @returns
    */
-  start(position, exceptVectorIds) {
+  start(position, exceptVectorIds,vectorType) {
     let flag = false;
     let selectInfo = {};
     if (!exceptVectorIds) {
       exceptVectorIds = {};
     }
     this.clear();
-    selectInfo.curveRoadEdgeInfo = this.isSelectCurveRoad(
-      position,
-      exceptVectorIds.exceptCurveRoadId
-    ); //包括edge
-    selectInfo.roadEdgeInfo = this.isSelectRoad(
-      position,
-      exceptVectorIds.exceptRoadIds
-    ); //包括edge
-    selectInfo.curveRoadPointInfo = this.isSelectCurveRoadPoint(
-      position,
-      exceptVectorIds.exceptCurveRoadPointId
-    );
-    selectInfo.roadPointInfo = this.isSelectRoadPoint(
-      position,
-      exceptVectorIds.exceptRoadPointId
-    );
-    selectInfo.pointInfo = this.isSelectPoint(
-      position,
-      exceptVectorIds.exceptPointId,
-      exceptVectorIds.exceptLineIds
-    );
+    selectInfo.curveRoadEdgeInfo = this.isSelectCurveRoad(position, exceptVectorIds.exceptCurveRoadId); //包括edge
+    selectInfo.roadEdgeInfo = this.isSelectRoad(position, exceptVectorIds.exceptRoadIds); //包括edge
+    selectInfo.curveRoadPointInfo = this.isSelectCurveRoadPoint(position, exceptVectorIds.exceptCurveRoadPointId);
+    selectInfo.roadPointInfo = this.isSelectRoadPoint(position, exceptVectorIds.exceptRoadPointId);
+    selectInfo.pointInfo = this.isSelectPoint(position, exceptVectorIds.exceptPointId, exceptVectorIds.exceptLineIds);
     // selectInfo.pointInfo = this.isSelectPoint(
     //   position,
     //   exceptVectorIds.exceptPointId
     // );
-    selectInfo.lineInfo = this.isSelectLine(
-      position,
-      exceptVectorIds.exceptLineIds
-    );
-    selectInfo.curvePointInfo = this.isSelectCurvePoint(
-      position,
-      exceptVectorIds.exceptCurvePointId
-    );
-    selectInfo.curveLineInfo = this.isSelectCurveLine(
-      position,
-      exceptVectorIds.exceptCurveLineId
-    );
-    selectInfo.circleInfo = this.isSelectCircle(
-      position,
-      exceptVectorIds.exceptCircleId
-    );
+    selectInfo.lineInfo = this.isSelectLine(position, exceptVectorIds.exceptLineIds);
+    selectInfo.curvePointInfo = this.isSelectCurvePoint(position, exceptVectorIds.exceptCurvePointId);
+    selectInfo.curveLineInfo = this.isSelectCurveLine(position, exceptVectorIds.exceptCurveLineId);
+    selectInfo.circleInfo = this.isSelectCircle(position, exceptVectorIds.exceptCircleId);
     //交叉口拐弯处的控制点
-    selectInfo.crossPointInfo = this.isSelectCrossCrossPoint(
-      position,
-      exceptVectorIds.exceptCrossCrossPointId
-    );
-    selectInfo.textInfo = this.isSelectText(
-      position,
-      exceptVectorIds.exceptTextId
-    );
-    selectInfo.svgInfo = this.isSelectSVG(
-      position,
-      exceptVectorIds.exceptSVGId
-    );
-    selectInfo.magnifierInfo = this.isSelectMagnifier(
-      position,
-      exceptVectorIds.exceptMagnifierId
-    );
+    selectInfo.crossPointInfo = this.isSelectCrossCrossPoint(position, exceptVectorIds.exceptCrossCrossPointId);
+    selectInfo.textInfo = this.isSelectText(position, exceptVectorIds.exceptTextId);
+    selectInfo.svgInfo = this.isSelectSVG(position, exceptVectorIds.exceptSVGId);
+    selectInfo.magnifierInfo = this.isSelectMagnifier(position, exceptVectorIds.exceptMagnifierId);
     this.setModifyPoint(position, selectInfo);
     flag = this.updateSelectItem();
     return flag;
@@ -141,19 +101,11 @@ export default class ListenLayer {
           }
         }
       } else {
-        if (
-          (Math.abs(position.x - curvePoint.x) * coordinate.zoom) /
-            coordinate.defaultZoom <
-          Constant.minAdsorbPix
-        ) {
+        if ((Math.abs(position.x - curvePoint.x) * coordinate.zoom) / coordinate.defaultZoom < Constant.minAdsorbPix) {
           seqInfo.linkedCurvePointIdX = curvePointId;
           seqInfo.x = curvePoint.x;
         }
-        if (
-          (Math.abs(position.y - curvePoint.y) * coordinate.zoom) /
-            coordinate.defaultZoom <
-          Constant.minAdsorbPix
-        ) {
+        if ((Math.abs(position.y - curvePoint.y) * coordinate.zoom) / coordinate.defaultZoom < Constant.minAdsorbPix) {
           seqInfo.linkedPointIdY = curvePointId;
           seqInfo.y = curvePoint.y;
         }
@@ -162,9 +114,7 @@ export default class ListenLayer {
 
     if (curvePointInfo.curvePointId) {
       curvePointInfo.linkedCurvePointId = curvePointInfo.curvePointId;
-      const linkedCurvePoint = dataService.getCurvePoint(
-        curvePointInfo.curvePointId
-      );
+      const linkedCurvePoint = dataService.getCurvePoint(curvePointInfo.curvePointId);
       curvePointInfo.x = linkedCurvePoint.x;
       curvePointInfo.y = linkedCurvePoint.y;
     } else {
@@ -176,16 +126,10 @@ export default class ListenLayer {
         curvePointInfo.linkedCurvePointIdY = seqInfo.linkedCurvePointIdY;
         curvePointInfo.y = seqInfo.y;
       }
-      if (
-        curvePointInfo.hasOwnProperty("y") &&
-        !curvePointInfo.hasOwnProperty("x")
-      ) {
+      if (curvePointInfo.hasOwnProperty("y") && !curvePointInfo.hasOwnProperty("x")) {
         curvePointInfo.x = position.x;
       }
-      if (
-        curvePointInfo.hasOwnProperty("x") &&
-        !curvePointInfo.hasOwnProperty("y")
-      ) {
+      if (curvePointInfo.hasOwnProperty("x") && !curvePointInfo.hasOwnProperty("y")) {
         curvePointInfo.y = position.y;
       }
     }
@@ -200,20 +144,12 @@ export default class ListenLayer {
     };
     const curveLines = dataService.getCurveLines();
     for (const curveLineId in curveLines) {
-      if (
-        exceptCurveLineIds &&
-        (exceptCurveLineIds.hasOwnProperty(curveLineId) ||
-          exceptCurveLineIds == curveLineId)
-      ) {
+      if (exceptCurveLineIds && (exceptCurveLineIds.hasOwnProperty(curveLineId) || exceptCurveLineIds == curveLineId)) {
         continue;
       }
       const curveLine = dataService.getCurveLine(curveLineId);
 
-      let joinInfo = this.distanceForBezier(
-        position,
-        curveLine.curves,
-        Constant.minAdsorbPix
-      );
+      let joinInfo = this.distanceForBezier(position, curveLine.curves, Constant.minAdsorbPix);
       //选中了路
       if (joinInfo.distance < Constant.minAdsorbPix) {
         curveLineInfo = {
@@ -277,19 +213,11 @@ export default class ListenLayer {
           }
         }
       } else {
-        if (
-          (Math.abs(position.x - point.x) * coordinate.zoom) /
-            coordinate.defaultZoom <
-          Constant.minAdsorbPix
-        ) {
+        if ((Math.abs(position.x - point.x) * coordinate.zoom) / coordinate.defaultZoom < Constant.minAdsorbPix) {
           seqInfo.linkedPointIdX = pointId;
           seqInfo.x = point.x;
         }
-        if (
-          (Math.abs(position.y - point.y) * coordinate.zoom) /
-            coordinate.defaultZoom <
-          Constant.minAdsorbPix
-        ) {
+        if ((Math.abs(position.y - point.y) * coordinate.zoom) / coordinate.defaultZoom < Constant.minAdsorbPix) {
           seqInfo.linkedPointIdY = pointId;
           seqInfo.y = point.y;
         }
@@ -342,8 +270,7 @@ export default class ListenLayer {
         line.getCategory() == VectorCategory.Line.ExtendedPositionLine ||
         line.getCategory() == VectorCategory.Line.GuideLocationLine ||
         line.getCategory() == VectorCategory.Line.GuidePositionLine ||
-        (line.getCategory() == VectorCategory.Line.PositionLine &&
-          line.getLocationMode() != Constant.angleLocationMode)
+        (line.getCategory() == VectorCategory.Line.PositionLine && line.getLocationMode() != Constant.angleLocationMode)
       ) {
         continue;
       }
@@ -421,12 +348,7 @@ export default class ListenLayer {
       //     };
       //   }
       // }
-      const flag = mathUtil.isPointInElliptic(
-        position,
-        circle.center,
-        circle.radiusX,
-        circle.radiusY
-      );
+      const flag = mathUtil.isPointInElliptic(position, circle.center, circle.radiusX, circle.radiusY);
       if (flag) {
         circleInfo = {
           circleId: circleId,
@@ -473,18 +395,10 @@ export default class ListenLayer {
           }
         }
       } else {
-        if (
-          (Math.abs(position.x - roadPoint.x) * coordinate.zoom) /
-            coordinate.defaultZoom <
-          Constant.minAdsorbPix
-        ) {
+        if ((Math.abs(position.x - roadPoint.x) * coordinate.zoom) / coordinate.defaultZoom < Constant.minAdsorbPix) {
           seqInfo.linkedRoadPointIdX = roadPointId;
           seqInfo.x = roadPoint.x;
-        } else if (
-          (Math.abs(position.y - roadPoint.y) * coordinate.zoom) /
-            coordinate.defaultZoom <
-          Constant.minAdsorbPix
-        ) {
+        } else if ((Math.abs(position.y - roadPoint.y) * coordinate.zoom) / coordinate.defaultZoom < Constant.minAdsorbPix) {
           seqInfo.linkedRoadPointIdY = roadPointId;
           seqInfo.y = roadPoint.y;
         }
@@ -507,16 +421,10 @@ export default class ListenLayer {
         roadPointInfo.y = seqInfo.y;
       }
 
-      if (
-        roadPointInfo.hasOwnProperty("y") &&
-        !roadPointInfo.hasOwnProperty("x")
-      ) {
+      if (roadPointInfo.hasOwnProperty("y") && !roadPointInfo.hasOwnProperty("x")) {
         roadPointInfo.x = position.x;
       }
-      if (
-        roadPointInfo.hasOwnProperty("x") &&
-        !roadPointInfo.hasOwnProperty("y")
-      ) {
+      if (roadPointInfo.hasOwnProperty("x") && !roadPointInfo.hasOwnProperty("y")) {
         roadPointInfo.y = position.y;
       }
     }
@@ -556,18 +464,10 @@ export default class ListenLayer {
           }
         }
       } else {
-        if (
-          (Math.abs(position.x - curveRoadPoint.x) * coordinate.zoom) /
-            coordinate.defaultZoom <
-          Constant.minAdsorbPix
-        ) {
+        if ((Math.abs(position.x - curveRoadPoint.x) * coordinate.zoom) / coordinate.defaultZoom < Constant.minAdsorbPix) {
           seqInfo.linkedCurveRoadPointIdX = curveRoadPointId;
           seqInfo.x = curveRoadPoint.x;
-        } else if (
-          (Math.abs(position.y - curveRoadPoint.y) * coordinate.zoom) /
-            coordinate.defaultZoom <
-          Constant.minAdsorbPix
-        ) {
+        } else if ((Math.abs(position.y - curveRoadPoint.y) * coordinate.zoom) / coordinate.defaultZoom < Constant.minAdsorbPix) {
           seqInfo.linkedCurveRoadPointIdY = curveRoadPointId;
           seqInfo.y = curveRoadPoint.y;
         }
@@ -575,33 +475,22 @@ export default class ListenLayer {
     }
 
     if (curveRoadPointInfo.curveRoadPointId) {
-      curveRoadPointInfo.linkedCurveRoadPointId =
-        curveRoadPointInfo.curveRoadPointId;
-      const linkedCurvePoint = dataService.getCurveRoadPoint(
-        curveRoadPointInfo.curveRoadPointId
-      );
+      curveRoadPointInfo.linkedCurveRoadPointId = curveRoadPointInfo.curveRoadPointId;
+      const linkedCurvePoint = dataService.getCurveRoadPoint(curveRoadPointInfo.curveRoadPointId);
       curveRoadPointInfo.x = linkedCurvePoint.x;
       curveRoadPointInfo.y = linkedCurvePoint.y;
     } else {
       if (seqInfo.hasOwnProperty("linkedCurveRoadPointIdX")) {
-        curveRoadPointInfo.linkedCurveRoadPointIdX =
-          seqInfo.linkedCurveRoadPointIdX;
+        curveRoadPointInfo.linkedCurveRoadPointIdX = seqInfo.linkedCurveRoadPointIdX;
         curveRoadPointInfo.x = seqInfo.x;
       } else if (seqInfo.hasOwnProperty("linkedCurveRoadPointIdY")) {
-        curveRoadPointInfo.linkedCurveRoadPointIdY =
-          seqInfo.linkedCurveRoadPointIdY;
+        curveRoadPointInfo.linkedCurveRoadPointIdY = seqInfo.linkedCurveRoadPointIdY;
         curveRoadPointInfo.y = seqInfo.y;
       }
-      if (
-        curveRoadPointInfo.hasOwnProperty("y") &&
-        !curveRoadPointInfo.hasOwnProperty("x")
-      ) {
+      if (curveRoadPointInfo.hasOwnProperty("y") && !curveRoadPointInfo.hasOwnProperty("x")) {
         curveRoadPointInfo.x = position.x;
       }
-      if (
-        curveRoadPointInfo.hasOwnProperty("x") &&
-        !curveRoadPointInfo.hasOwnProperty("y")
-      ) {
+      if (curveRoadPointInfo.hasOwnProperty("x") && !curveRoadPointInfo.hasOwnProperty("y")) {
         curveRoadPointInfo.y = position.y;
       }
     }
@@ -638,25 +527,13 @@ export default class ListenLayer {
       let rightLine = mathUtil.createLine1(rightEdge.start, rightEdge.end);
       let rightJoin = mathUtil.getJoinLinePoint(position, rightLine);
 
-      let leftSideLine = leftEdge.roadSide
-        ? mathUtil.createLine1(leftEdge.roadSide.start, leftEdge.roadSide.end)
-        : null;
-      let leftSideJoin = leftSideLine
-        ? mathUtil.getJoinLinePoint(position, leftSideLine)
-        : null;
+      let leftSideLine = leftEdge.roadSide ? mathUtil.createLine1(leftEdge.roadSide.start, leftEdge.roadSide.end) : null;
+      let leftSideJoin = leftSideLine ? mathUtil.getJoinLinePoint(position, leftSideLine) : null;
 
-      let rightSideLine = rightEdge.roadSide
-        ? mathUtil.createLine1(rightEdge.roadSide.start, rightEdge.roadSide.end)
-        : null;
-      let rightSideJoin = rightSideLine
-        ? mathUtil.getJoinLinePoint(position, rightSideLine)
-        : null;
+      let rightSideLine = rightEdge.roadSide ? mathUtil.createLine1(rightEdge.roadSide.start, rightEdge.roadSide.end) : null;
+      let rightSideJoin = rightSideLine ? mathUtil.getJoinLinePoint(position, rightSideLine) : null;
       let distance = this.getDistance(position, join);
-      if (
-        mathUtil.isContainForSegment(join, startPoint, endPoint) &&
-        (mathUtil.isContainForSegment(position, join, leftJoin) ||
-          mathUtil.isContainForSegment(position, join, rightJoin))
-      ) {
+      if (mathUtil.isContainForSegment(join, startPoint, endPoint) && (mathUtil.isContainForSegment(position, join, leftJoin) || mathUtil.isContainForSegment(position, join, rightJoin))) {
         if (!roadInfo.roadId || distance < roadInfo.distance) {
           roadInfo = {
             roadId: roadId,
@@ -685,15 +562,11 @@ export default class ListenLayer {
       }
 
       //检查edge
-    
+
       distance = this.getDistance(position, leftJoin);
       if (
-        mathUtil.isContainForSegment(leftJoin, leftEdge.start, leftEdge.end) &&
-        distance < Constant.minAdsorbPix / 2   ||
-        (mathUtil.isContainForSegment(join, startPoint, endPoint) &&
-         leftSideJoin &&
-         mathUtil.isContainForSegment(position, leftSideJoin, leftJoin)
-        )
+        (mathUtil.isContainForSegment(leftJoin, leftEdge.start, leftEdge.end) && distance < Constant.minAdsorbPix / 2) ||
+        (mathUtil.isContainForSegment(join, startPoint, endPoint) && leftSideJoin && mathUtil.isContainForSegment(position, leftSideJoin, leftJoin))
       ) {
         if (!edgeInfo.edgeId || distance < edgeInfo.distance) {
           edgeInfo = {
@@ -708,15 +581,8 @@ export default class ListenLayer {
       distance = this.getDistance(position, rightJoin);
 
       if (
-        mathUtil.isContainForSegment(
-          rightJoin,
-          rightEdge.start,
-          rightEdge.end
-        ) &&
-        distance < Constant.minAdsorbPix / 2  ||
-        (mathUtil.isContainForSegment(join, startPoint, endPoint) &&
-         rightSideJoin &&
-         mathUtil.isContainForSegment(position,rightSideJoin,rightJoin))
+        (mathUtil.isContainForSegment(rightJoin, rightEdge.start, rightEdge.end) && distance < Constant.minAdsorbPix / 2) ||
+        (mathUtil.isContainForSegment(join, startPoint, endPoint) && rightSideJoin && mathUtil.isContainForSegment(position, rightSideJoin, rightJoin))
       ) {
         if (!edgeInfo.edgeId || distance < edgeInfo.distance) {
           edgeInfo = {
@@ -729,16 +595,10 @@ export default class ListenLayer {
       }
     }
 
-    if (
-      roadInfo.roadId &&
-      (!edgeInfo.edgeId || roadInfo.distance < edgeInfo.distance)
-    ) {
+    if (roadInfo.roadId && (!edgeInfo.edgeId || roadInfo.distance < edgeInfo.distance)) {
       const linkedRoad = dataService.getRoad(roadInfo.roadId);
       const linkedRoadLine = roadService.getMidLine(linkedRoad);
-      const linkedPosition = mathUtil.getJoinLinePoint(
-        position,
-        linkedRoadLine
-      );
+      const linkedPosition = mathUtil.getJoinLinePoint(position, linkedRoadLine);
 
       roadInfo.x = linkedPosition.x;
       roadInfo.y = linkedPosition.y;
@@ -802,33 +662,14 @@ export default class ListenLayer {
       console.log("isSelectCurveRoad:" + JSON.stringify(joinInfo));
       //检查edge
       const leftCurveEdge = dataService.getCurveRoadEdge(curveRoad.leftEdgeId);
-      const leftJoinInfo = this.distanceForBezier(
-        position,
-        leftCurveEdge.curves,
-        Constant.minAdsorbPix
-      );
+      const leftJoinInfo = this.distanceForBezier(position, leftCurveEdge.curves, Constant.minAdsorbPix);
 
-      const rightCurveEdge = dataService.getCurveRoadEdge(
-        curveRoad.rightEdgeId
-      );
-      const rightJoinInfo = this.distanceForBezier(
-        position,
-        rightCurveEdge.curves,
-        Constant.minAdsorbPix
-      );
+      const rightCurveEdge = dataService.getCurveRoadEdge(curveRoad.rightEdgeId);
+      const rightJoinInfo = this.distanceForBezier(position, rightCurveEdge.curves, Constant.minAdsorbPix);
 
-      let line1 = mathUtil.createLine1(
-        joinInfo.position,
-        leftJoinInfo.position
-      );
+      let line1 = mathUtil.createLine1(joinInfo.position, leftJoinInfo.position);
       let position1 = mathUtil.getJoinLinePoint(position, line1);
-      if (
-        mathUtil.isContainForSegment(
-          position1,
-          joinInfo.position,
-          leftJoinInfo.position
-        )
-      ) {
+      if (mathUtil.isContainForSegment(position1, joinInfo.position, leftJoinInfo.position)) {
         if (joinInfo.distance < curveRoad.leftWidth) {
           curveRoadInfo = {
             curveRoadId: curveRoadId,
@@ -840,19 +681,10 @@ export default class ListenLayer {
         }
         curveRoadInfo.dir = "left";
       } else {
-        let line2 = mathUtil.createLine1(
-          joinInfo.position,
-          rightJoinInfo.position
-        );
+        let line2 = mathUtil.createLine1(joinInfo.position, rightJoinInfo.position);
 
         let position2 = mathUtil.getJoinLinePoint(position, line2);
-        if (
-          mathUtil.isContainForSegment(
-            position2,
-            joinInfo.position,
-            rightJoinInfo.position
-          )
-        ) {
+        if (mathUtil.isContainForSegment(position2, joinInfo.position, rightJoinInfo.position)) {
           if (joinInfo.distance < curveRoad.rightWidth) {
             curveRoadInfo = {
               curveRoadId: curveRoadId,
@@ -867,10 +699,7 @@ export default class ListenLayer {
       }
 
       if (leftJoinInfo.distance < Constant.minAdsorbPix) {
-        const index = mathUtil.getCurvesIndexForCurvesPoints(
-          leftJoinInfo.position,
-          curveRoad.points
-        );
+        const index = mathUtil.getCurvesIndexForCurvesPoints(leftJoinInfo.position, curveRoad.points);
         curveEdgeInfo = {
           curveEdgeId: curveRoad.leftEdgeId,
           type: VectorType.CurveRoadEdge,
@@ -880,10 +709,7 @@ export default class ListenLayer {
           y: leftJoinInfo.position.y,
         };
       } else if (rightJoinInfo.distance < Constant.minAdsorbPix) {
-        const index = mathUtil.getCurvesIndexForCurvesPoints(
-          rightJoinInfo.position,
-          curveRoad.points
-        );
+        const index = mathUtil.getCurvesIndexForCurvesPoints(rightJoinInfo.position, curveRoad.points);
         curveEdgeInfo = {
           curveEdgeId: curveRoad.rightEdgeId,
           type: VectorType.CurveRoadEdge,
@@ -894,11 +720,7 @@ export default class ListenLayer {
         };
       }
     }
-    if (
-      curveRoadInfo.curveRoadId &&
-      (!curveEdgeInfo.curveEdgeId ||
-        curveRoadInfo.distance < curveEdgeInfo.distance)
-    ) {
+    if (curveRoadInfo.curveRoadId && (!curveEdgeInfo.curveEdgeId || curveRoadInfo.distance < curveEdgeInfo.distance)) {
       // console.log("选中的CurveRoad:" + curveRoadInfo.curveRoadId);
       return curveRoadInfo;
     } else if (curveEdgeInfo.curveEdgeId) {
@@ -971,12 +793,18 @@ export default class ListenLayer {
   }
 
   isSelectSVG(position, exceptSVGId) {
+    // console.error(stateService.getEventName());
+    // if (stateService.getEventName() == LayerEvents.AddingRoad) {
+    //   this.modifyPoint = null;
+    //   return false;
+    // }
     let svgInfo = {
       svgId: null,
       type: null,
       distance: null,
     };
     const svgs = dataService.getSVGs();
+
     for (const svgId in svgs) {
       if (svgId == exceptSVGId) {
         continue;
@@ -991,6 +819,8 @@ export default class ListenLayer {
             distance: distance,
             type: VectorType.SVG,
             index: i,
+            x: position.x,
+            y: position.y,
           };
         } else if (svgInfo.svgId && distance < svgInfo.distance) {
           svgInfo = {
@@ -998,6 +828,8 @@ export default class ListenLayer {
             distance: distance,
             type: VectorType.SVG,
             index: i,
+            x: position.x,
+            y: position.y,
           };
         }
       }
@@ -1009,11 +841,14 @@ export default class ListenLayer {
         svgInfo = {
           svgId: svgId,
           type: VectorType.SVG,
+          x: position.x,
+          y: position.y,
           index: -1,
         };
         break;
       }
     }
+    // console.error(svgInfo);
     return svgInfo;
   }
 
@@ -1095,10 +930,7 @@ export default class ListenLayer {
       this.modifyPoint.index = info.circleInfo.index;
       this.modifyPoint.x = info.circleInfo.x;
       this.modifyPoint.y = info.circleInfo.y;
-    } else if (
-      info &&
-      (info.pointInfo.pointId || info.curvePointInfo.curvePointId)
-    ) {
+    } else if (info && (info.pointInfo.pointId || info.curvePointInfo.curvePointId)) {
       this.modifyPoint = {};
       if (info.pointInfo.pointId && info.curvePointInfo.curvePointId) {
         if (info.pointInfo.distance < info.curvePointInfo.distance) {
@@ -1106,8 +938,7 @@ export default class ListenLayer {
           this.modifyPoint.x = info.pointInfo.x;
           this.modifyPoint.y = info.pointInfo.y;
         } else {
-          this.modifyPoint.linkedCurvePointId =
-            info.curvePointInfo.curvePointId;
+          this.modifyPoint.linkedCurvePointId = info.curvePointInfo.curvePointId;
           this.modifyPoint.x = info.curvePointInfo.x;
           this.modifyPoint.y = info.curvePointInfo.y;
         }
@@ -1120,10 +951,7 @@ export default class ListenLayer {
         this.modifyPoint.x = info.curvePointInfo.x;
         this.modifyPoint.y = info.curvePointInfo.y;
       }
-    } else if (
-      info &&
-      (info.lineInfo.lineId || info.curveLineInfo.curveLineId)
-    ) {
+    } else if (info && (info.lineInfo.lineId || info.curveLineInfo.curveLineId)) {
       this.modifyPoint = {};
       if (info.lineInfo.lineId && info.curveLineInfo.curveLineId) {
         if (info.lineInfo.distance < info.curveLineInfo.distance) {
@@ -1148,22 +976,16 @@ export default class ListenLayer {
       this.modifyPoint = {};
       this.modifyPoint.svgId = info.svgInfo.svgId;
       this.modifyPoint.index = info.svgInfo.index;
-    } else if (
-      info &&
-      (info.roadPointInfo.roadPointId ||
-        info.curveRoadPointInfo.curveRoadPointId)
-    ) {
-      if (
-        info.roadPointInfo.roadPointId &&
-        info.curveRoadPointInfo.curveRoadPointId
-      ) {
+      this.modifyPoint.x = info.svgInfo.x;
+      this.modifyPoint.y = info.svgInfo.y;
+    } else if (info && (info.roadPointInfo.roadPointId || info.curveRoadPointInfo.curveRoadPointId)) {
+      if (info.roadPointInfo.roadPointId && info.curveRoadPointInfo.curveRoadPointId) {
         if (info.roadPointInfo.distance < info.curveRoadPointInfo.distance) {
           this.modifyPoint.linkedRoadPointId = info.roadPointInfo.roadPointId;
           this.modifyPoint.x = info.roadPointInfo.x;
           this.modifyPoint.y = info.roadPointInfo.y;
         } else {
-          this.modifyPoint.linkedCurveRoadPointId =
-            info.curveRoadPointInfo.curveRoadPointId;
+          this.modifyPoint.linkedCurveRoadPointId = info.curveRoadPointInfo.curveRoadPointId;
           this.modifyPoint.x = info.curveRoadPointInfo.x;
           this.modifyPoint.y = info.curveRoadPointInfo.y;
         }
@@ -1172,15 +994,11 @@ export default class ListenLayer {
         this.modifyPoint.x = info.roadPointInfo.x;
         this.modifyPoint.y = info.roadPointInfo.y;
       } else if (info.curveRoadPointInfo.curveRoadPointId) {
-        this.modifyPoint.linkedCurveRoadPointId =
-          info.curveRoadPointInfo.curveRoadPointId;
+        this.modifyPoint.linkedCurveRoadPointId = info.curveRoadPointInfo.curveRoadPointId;
         this.modifyPoint.x = info.curveRoadPointInfo.x;
         this.modifyPoint.y = info.curveRoadPointInfo.y;
       }
-    } else if (
-      info &&
-      (info.roadEdgeInfo.roadId || info.curveRoadEdgeInfo.curveRoadId)
-    ) {
+    } else if (info && (info.roadEdgeInfo.roadId || info.curveRoadEdgeInfo.curveRoadId)) {
       this.modifyPoint = {};
       if (info.roadEdgeInfo.roadId && info.curveRoadEdgeInfo.curveRoadId) {
         if (roadEdgeInfo.distance < info.curveRoadEdgeInfo.distance) {
@@ -1205,10 +1023,7 @@ export default class ListenLayer {
         this.modifyPoint.y = info.curveRoadEdgeInfo.y;
         this.modifyPoint.dir = info.curveRoadEdgeInfo.dir;
       }
-    } else if (
-      info &&
-      (info.roadEdgeInfo.edgeId || info.curveRoadEdgeInfo.curveEdgeId)
-    ) {
+    } else if (info && (info.roadEdgeInfo.edgeId || info.curveRoadEdgeInfo.curveEdgeId)) {
       this.modifyPoint = {};
       if (info.roadEdgeInfo.edgeId && info.curveRoadEdgeInfo.curveEdgeId) {
         if (info.roadEdgeInfo.distance < info.curveRoadEdgeInfo.distance) {
@@ -1216,8 +1031,7 @@ export default class ListenLayer {
           this.modifyPoint.x = info.roadEdgeInfo.x;
           this.modifyPoint.y = info.roadEdgeInfo.y;
         } else {
-          this.modifyPoint.linkedCurveEdgeId =
-            info.curveRoadEdgeInfo.curveEdgeId;
+          this.modifyPoint.linkedCurveEdgeId = info.curveRoadEdgeInfo.curveEdgeId;
           this.modifyPoint.selectIndex = info.curveRoadEdgeInfo.selectIndex;
           this.modifyPoint.x = info.curveRoadEdgeInfo.x;
           this.modifyPoint.y = info.curveRoadEdgeInfo.y;
@@ -1234,57 +1048,40 @@ export default class ListenLayer {
       }
     } else if (info && info.crossPointInfo.crossCrossPointId) {
       this.modifyPoint = {};
-      this.modifyPoint.linkedCrossCrossPointId =
-        info.crossPointInfo.crossCrossPointId;
+      this.modifyPoint.linkedCrossCrossPointId = info.crossPointInfo.crossCrossPointId;
       this.modifyPoint.x = info.crossPointInfo.x;
       this.modifyPoint.y = info.crossPointInfo.y;
     } else if (info && info.roadPointInfo.linkedRoadPointIdX) {
       this.modifyPoint = {};
-      this.modifyPoint.linkedRoadPointIdX =
-        info.roadPointInfo.linkedRoadPointIdX;
+      this.modifyPoint.linkedRoadPointIdX = info.roadPointInfo.linkedRoadPointIdX;
       this.modifyPoint.x = info.roadPointInfo.x;
       this.modifyPoint.y = info.roadPointInfo.y;
     } else if (info && info.roadPointInfo.linkedRoadPointIdY) {
       this.modifyPoint = {};
-      this.modifyPoint.linkedRoadPointIdY =
-        info.roadPointInfo.linkedRoadPointIdY;
+      this.modifyPoint.linkedRoadPointIdY = info.roadPointInfo.linkedRoadPointIdY;
       this.modifyPoint.y = info.roadPointInfo.y;
       this.modifyPoint.x = info.roadPointInfo.x;
     } else if (info && info.curvePointInfo.linkedRoadPointIdX) {
       this.modifyPoint = {};
-      this.modifyPoint.linkedRoadPointIdX =
-        info.curvePointInfo.linkedRoadPointIdX;
+      this.modifyPoint.linkedRoadPointIdX = info.curvePointInfo.linkedRoadPointIdX;
       this.modifyPoint.x = info.curvePointInfo.x;
       this.modifyPoint.y = position.y;
     } else if (info && info.curvePointInfo.linkedRoadPointIdY) {
       this.modifyPoint = {};
-      this.modifyPoint.linkedRoadPointIdY =
-        info.curvePointInfo.linkedRoadPointIdY;
+      this.modifyPoint.linkedRoadPointIdY = info.curvePointInfo.linkedRoadPointIdY;
       this.modifyPoint.y = info.curvePointInfo.y;
       this.modifyPoint.x = position.x;
-    } else if (
-      info &&
-      info.pointInfo.linkedPointIdX &&
-      !info.pointInfo.linkedPointIdY
-    ) {
+    } else if (info && info.pointInfo.linkedPointIdX && !info.pointInfo.linkedPointIdY) {
       this.modifyPoint = {};
       this.modifyPoint.linkedPointIdX = info.pointInfo.linkedPointIdX;
       this.modifyPoint.x = info.pointInfo.x;
       this.modifyPoint.y = info.pointInfo.y;
-    } else if (
-      info &&
-      info.pointInfo.linkedPointIdY &&
-      !info.pointInfo.linkedPointIdX
-    ) {
+    } else if (info && info.pointInfo.linkedPointIdY && !info.pointInfo.linkedPointIdX) {
       this.modifyPoint = {};
       this.modifyPoint.linkedPointIdY = info.pointInfo.linkedPointIdY;
       this.modifyPoint.y = info.pointInfo.y;
       this.modifyPoint.x = info.pointInfo.x;
-    } else if (
-      info &&
-      info.pointInfo.linkedPointIdY &&
-      info.pointInfo.linkedPointIdX
-    ) {
+    } else if (info && info.pointInfo.linkedPointIdY && info.pointInfo.linkedPointIdX) {
       this.modifyPoint = {};
       this.modifyPoint.linkedPointIdX = info.pointInfo.linkedPointIdX;
       this.modifyPoint.linkedPointIdY = info.pointInfo.linkedPointIdY;
@@ -1305,103 +1102,40 @@ export default class ListenLayer {
         return false;
       }
     } else if (this.modifyPoint.linkedRoadPointId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedRoadPointId,
-        VectorType.RoadPoint,
-        SelectState.Select
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedRoadPointId, VectorType.RoadPoint, SelectState.Select);
     } else if (this.modifyPoint.linkedCurveRoadPointId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedCurveRoadPointId,
-        VectorType.CurveRoadPoint,
-        SelectState.Select,
-        this.modifyPoint.dir
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedCurveRoadPointId, VectorType.CurveRoadPoint, SelectState.Select, this.modifyPoint.dir);
     } else if (this.modifyPoint.linkedRoadId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedRoadId,
-        VectorType.Road,
-        SelectState.Select,
-        this.modifyPoint.dir
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedRoadId, VectorType.Road, SelectState.Select, this.modifyPoint.dir);
     } else if (this.modifyPoint.linkedCurveRoadId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedCurveRoadId,
-        VectorType.CurveRoad,
-        SelectState.Select,
-        this.modifyPoint.dir
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedCurveRoadId, VectorType.CurveRoad, SelectState.Select, this.modifyPoint.dir);
     } else if (this.modifyPoint.linkedCrossCrossPointId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedCrossCrossPointId,
-        VectorType.CrossPoint,
-        SelectState.Select
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedCrossCrossPointId, VectorType.CrossPoint, SelectState.Select);
     } else if (this.modifyPoint.textId) {
-      stateService.setSelectItem(
-        this.modifyPoint.textId,
-        VectorType.Text,
-        SelectState.Select
-      );
+      stateService.setSelectItem(this.modifyPoint.textId, VectorType.Text, SelectState.Select);
     } else if (this.modifyPoint.magnifierId) {
       // if (this.modifyPoint.index == 0) {
       //点击隐藏的放大镜不显示
-      stateService.setSelectItem(
-        this.modifyPoint.magnifierId,
-        VectorType.Magnifier,
-        this.modifyPoint.index
-      );
+      stateService.setSelectItem(this.modifyPoint.magnifierId, VectorType.Magnifier, this.modifyPoint.index);
       // } else {
       stateService.setSelectState(this.modifyPoint.index);
       // }
     } else if (this.modifyPoint.svgId) {
-      stateService.setSelectItem(
-        this.modifyPoint.svgId,
-        VectorType.SVG,
-        this.modifyPoint.index
-      );
+      stateService.setSelectItem(this.modifyPoint.svgId, VectorType.SVG, this.modifyPoint.index);
     } else if (this.modifyPoint.linkedEdgeId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedEdgeId,
-        VectorType.RoadEdge,
-        SelectState.Select
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedEdgeId, VectorType.RoadEdge, SelectState.Select);
     } else if (this.modifyPoint.linkedCurveEdgeId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedCurveEdgeId,
-        VectorType.CurveRoadEdge,
-        SelectState.Select
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedCurveEdgeId, VectorType.CurveRoadEdge, SelectState.Select);
     } else if (this.modifyPoint.linkedPointId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedPointId,
-        VectorType.Point,
-        SelectState.Select
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedPointId, VectorType.Point, SelectState.Select);
     } else if (this.modifyPoint.linkedCurvePointId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedCurvePointId,
-        VectorType.CurvePoint,
-        SelectState.Select
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedCurvePointId, VectorType.CurvePoint, SelectState.Select);
     } else if (this.modifyPoint.linkedLineId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedLineId,
-        VectorType.Line,
-        SelectState.Select
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedLineId, VectorType.Line, SelectState.Select);
     } else if (this.modifyPoint.linkedCurveLineId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedCurveLineId,
-        VectorType.CurveLine,
-        SelectState.Select
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedCurveLineId, VectorType.CurveLine, SelectState.Select);
     } else if (this.modifyPoint.linkedCircleId) {
-      stateService.setSelectItem(
-        this.modifyPoint.linkedCircleId,
-        VectorType.Circle,
-        this.modifyPoint.index
-      );
+      stateService.setSelectItem(this.modifyPoint.linkedCircleId, VectorType.Circle, this.modifyPoint.index);
     } else {
       stateService.clearSelectItem();
     }
@@ -1439,10 +1173,7 @@ export default class ListenLayer {
 
   //调整到与像素的长度一致
   getDistance(start, end) {
-    return (
-      (mathUtil.getDistance(start, end) * coordinate.zoom) /
-      coordinate.defaultZoom
-    );
+    return (mathUtil.getDistance(start, end) * coordinate.zoom) / coordinate.defaultZoom;
   }
 
   clear() {