Browse Source

修改选择的层级

xushiting 2 years ago
parent
commit
d9f8217606
1 changed files with 45 additions and 45 deletions
  1. 45 45
      src/graphic/ListenLayer.js

+ 45 - 45
src/graphic/ListenLayer.js

@@ -989,31 +989,6 @@ export default class ListenLayer {
       }
     } 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) {
-          this.modifyPoint.linkedPointId = info.pointInfo.pointId;
-          this.modifyPoint.x = info.pointInfo.x;
-          this.modifyPoint.y = info.pointInfo.y;
-        } else {
-          this.modifyPoint.linkedCurvePointId =
-            info.curvePointInfo.curvePointId;
-          this.modifyPoint.x = info.curvePointInfo.x;
-          this.modifyPoint.y = info.curvePointInfo.y;
-        }
-      } else if (info.pointInfo.pointId) {
-        this.modifyPoint.linkedPointId = info.pointInfo.pointId;
-        this.modifyPoint.x = info.pointInfo.x;
-        this.modifyPoint.y = info.pointInfo.y;
-      } else if (info.curvePointInfo.curvePointId) {
-        this.modifyPoint.linkedCurvePointId = info.curvePointInfo.curvePointId;
-        this.modifyPoint.x = info.curvePointInfo.x;
-        this.modifyPoint.y = info.curvePointInfo.y;
-      }
-    } else if (
-      info &&
       (info.roadEdgeInfo.roadId || info.curveRoadEdgeInfo.curveRoadId)
     ) {
       this.modifyPoint = {};
@@ -1040,23 +1015,6 @@ export default class ListenLayer {
         this.modifyPoint.y = info.curveRoadEdgeInfo.y;
         this.modifyPoint.dir = info.curveRoadEdgeInfo.dir;
       }
-    } else if (info && info.crossPointInfo.crossCrossPointId) {
-      this.modifyPoint = {};
-      this.modifyPoint.linkedCrossCrossPointId =
-        info.crossPointInfo.crossCrossPointId;
-      this.modifyPoint.x = info.crossPointInfo.x;
-      this.modifyPoint.y = info.crossPointInfo.y;
-    } else if (info && info.textInfo.textId) {
-      this.modifyPoint = {};
-      this.modifyPoint.textId = info.textInfo.textId;
-      this.modifyPoint.x = info.textInfo.x;
-      this.modifyPoint.y = info.textInfo.y;
-    } else if (info && info.magnifierInfo.magnifierId) {
-      this.modifyPoint = {};
-      this.modifyPoint.magnifierId = info.magnifierInfo.magnifierId;
-      this.modifyPoint.index = info.magnifierInfo.index;
-      this.modifyPoint.x = info.magnifierInfo.x;
-      this.modifyPoint.y = info.magnifierInfo.y;
     } else if (
       info &&
       (info.roadEdgeInfo.edgeId || info.curveRoadEdgeInfo.curveEdgeId)
@@ -1084,6 +1042,37 @@ export default class ListenLayer {
         this.modifyPoint.x = info.curveRoadEdgeInfo.x;
         this.modifyPoint.y = info.curveRoadEdgeInfo.y;
       }
+    } else if (info && info.crossPointInfo.crossCrossPointId) {
+      this.modifyPoint = {};
+      this.modifyPoint.linkedCrossCrossPointId =
+        info.crossPointInfo.crossCrossPointId;
+      this.modifyPoint.x = info.crossPointInfo.x;
+      this.modifyPoint.y = info.crossPointInfo.y;
+    } 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) {
+          this.modifyPoint.linkedPointId = info.pointInfo.pointId;
+          this.modifyPoint.x = info.pointInfo.x;
+          this.modifyPoint.y = info.pointInfo.y;
+        } else {
+          this.modifyPoint.linkedCurvePointId =
+            info.curvePointInfo.curvePointId;
+          this.modifyPoint.x = info.curvePointInfo.x;
+          this.modifyPoint.y = info.curvePointInfo.y;
+        }
+      } else if (info.pointInfo.pointId) {
+        this.modifyPoint.linkedPointId = info.pointInfo.pointId;
+        this.modifyPoint.x = info.pointInfo.x;
+        this.modifyPoint.y = info.pointInfo.y;
+      } else if (info.curvePointInfo.curvePointId) {
+        this.modifyPoint.linkedCurvePointId = info.curvePointInfo.curvePointId;
+        this.modifyPoint.x = info.curvePointInfo.x;
+        this.modifyPoint.y = info.curvePointInfo.y;
+      }
     } else if (
       info &&
       (info.lineInfo.lineId || info.curveLineInfo.curveLineId)
@@ -1108,16 +1097,27 @@ export default class ListenLayer {
         this.modifyPoint.x = info.curveLineInfo.x;
         this.modifyPoint.y = info.curveLineInfo.y;
       }
+    } else if (info && info.svgInfo.svgId) {
+      this.modifyPoint = {};
+      this.modifyPoint.svgId = info.svgInfo.svgId;
+      this.modifyPoint.index = info.svgInfo.index;
+    } else if (info && info.magnifierInfo.magnifierId) {
+      this.modifyPoint = {};
+      this.modifyPoint.magnifierId = info.magnifierInfo.magnifierId;
+      this.modifyPoint.index = info.magnifierInfo.index;
+      this.modifyPoint.x = info.magnifierInfo.x;
+      this.modifyPoint.y = info.magnifierInfo.y;
     } else if (info && info.circleInfo.circleId) {
       this.modifyPoint = {};
       this.modifyPoint.linkedCircleId = info.circleInfo.circleId;
       this.modifyPoint.index = info.circleInfo.index;
       this.modifyPoint.x = info.circleInfo.x;
       this.modifyPoint.y = info.circleInfo.y;
-    } else if (info && info.svgInfo.svgId) {
+    } else if (info && info.textInfo.textId) {
       this.modifyPoint = {};
-      this.modifyPoint.svgId = info.svgInfo.svgId;
-      this.modifyPoint.index = info.svgInfo.index;
+      this.modifyPoint.textId = info.textInfo.textId;
+      this.modifyPoint.x = info.textInfo.x;
+      this.modifyPoint.y = info.textInfo.y;
     } else if (info && info.roadPointInfo.linkedRoadPointIdX) {
       this.modifyPoint = {};
       this.modifyPoint.linkedRoadPointIdX =