Browse Source

继续绘图

xushiting 2 years ago
parent
commit
0d94216bfd
2 changed files with 6 additions and 21 deletions
  1. 0 15
      src/graphic/Layer.js
  2. 6 6
      src/graphic/ListenLayer.js

+ 0 - 15
src/graphic/Layer.js

@@ -352,21 +352,6 @@ export default class Layer {
         if (!draggingItem || !draggingItem.vectorId) {
           return;
         }
-
-        listenLayer.start(
-          position,
-          draggingItem.vectorId,
-          null,
-          null,
-          null,
-          draggingItem.vectorId
-        );
-        if (listenLayer.modifyPoint) {
-          position = {
-            x: listenLayer.modifyPoint.x,
-            y: listenLayer.modifyPoint.y,
-          };
-        }
         moveRoad.moveControlPoint(draggingItem.vectorId, position);
         needAutoRedraw = true;
         break;

+ 6 - 6
src/graphic/ListenLayer.js

@@ -490,6 +490,12 @@ export default class ListenLayer {
         this.modifyPoint.x = curveRoadEdgeInfo.x;
         this.modifyPoint.y = curveRoadEdgeInfo.y;
       }
+    } else if (controlPointInfo.crossControlPointId) {
+      this.modifyPoint = {};
+      this.modifyPoint.linkedCrossControlPointId =
+        controlPointInfo.crossControlPointId;
+      this.modifyPoint.x = controlPointInfo.x;
+      this.modifyPoint.y = controlPointInfo.y;
     } else if (roadEdgeInfo.edgeId || curveRoadEdgeInfo.curveEdgeId) {
       this.modifyPoint = {};
       if (roadEdgeInfo.edgeId && curveRoadEdgeInfo.curveEdgeId) {
@@ -513,12 +519,6 @@ export default class ListenLayer {
         this.modifyPoint.x = curveRoadEdgeInfo.x;
         this.modifyPoint.y = curveRoadEdgeInfo.y;
       }
-    } else if (controlPointInfo.crossControlPointId) {
-      this.modifyPoint = {};
-      this.modifyPoint.linkedCrossControlPointId =
-        controlPointInfo.crossControlPointId;
-      this.modifyPoint.x = controlPointInfo.x;
-      this.modifyPoint.y = controlPointInfo.y;
     } else if (pointInfo.linkedPointIdX) {
       this.modifyPoint = {};
       this.modifyPoint.linkedPointIdX = pointInfo.linkedPointIdX;