Browse Source

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

bill 2 years ago
parent
commit
186a58e08e
2 changed files with 53 additions and 0 deletions
  1. 51 0
      src/graphic/Controls/UIControl.js
  2. 2 0
      src/graphic/Layer.js

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

@@ -380,7 +380,58 @@ export default class UIControl {
           if (endPoint.getCategory() != VectorCategory.Point.BasePoint) {
           if (endPoint.getCategory() != VectorCategory.Point.BasePoint) {
             pointService.deletePoint(line.endId);
             pointService.deletePoint(line.endId);
           }
           }
+        } else if (
+          line.getCategory() == VectorCategory.Line.LocationLineByFixPoint
+        ) {
+          let lines = dataService.getLines();
+          for (let key in lines) {
+            let _line = dataService.getLine(key);
+            if (
+              _line.getCategory() == VectorCategory.Line.ExtendedPositionLine
+            ) {
+              if (
+                line.startId == _line.startId ||
+                line.startId == _line.endId ||
+                line.endId == _line.startId ||
+                line.endId == _line.endId
+              ) {
+                dataService.deleteLine(key);
+                break;
+              }
+            }
+          }
+        } else if (
+          line.getCategory() == VectorCategory.Line.LocationLineByBasePoint
+        ) {
+          let lines = dataService.getLines();
+          for (let key in lines) {
+            let _line = dataService.getLine(key);
+            if (
+              _line.getCategory() == VectorCategory.Line.ExtendedPositionLine
+            ) {
+              if (
+                line.startId == _line.startId ||
+                line.startId == _line.endId ||
+                line.endId == _line.startId ||
+                line.endId == _line.endId
+              ) {
+                dataService.deleteLine(key);
+              }
+            } else if (
+              _line.getCategory() == VectorCategory.Line.GuideLocationLine
+            ) {
+              if (
+                line.startId == _line.startId ||
+                line.startId == _line.endId ||
+                line.endId == _line.startId ||
+                line.endId == _line.endId
+              ) {
+                dataService.deleteLine(key);
+              }
+            }
+          }
         }
         }
+
         break;
         break;
       case VectorType.CurveLine:
       case VectorType.CurveLine:
         lineService.deleteCurveLine(vectorId);
         lineService.deleteCurveLine(vectorId);

+ 2 - 0
src/graphic/Layer.js

@@ -1277,6 +1277,7 @@ export default class Layer {
             );
             );
           }
           }
         }
         }
+        elementService.hideAll();
         this.history.save();
         this.history.save();
         break;
         break;
       case LayerEvents.MoveCurveLine:
       case LayerEvents.MoveCurveLine:
@@ -1290,6 +1291,7 @@ export default class Layer {
       case LayerEvents.AddPoint:
       case LayerEvents.AddPoint:
         // 绘制的是基准点
         // 绘制的是基准点
         if (Settings.selectPointCategory == VectorCategory.Point.BasePoint) {
         if (Settings.selectPointCategory == VectorCategory.Point.BasePoint) {
+          uiService.setSelectPointCategory(null);
           stateService.clearEventName();
           stateService.clearEventName();
           this.history.save();
           this.history.save();
         } else {
         } else {