浏览代码

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

bill 2 年之前
父节点
当前提交
186a58e08e
共有 2 个文件被更改,包括 53 次插入0 次删除
  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) {
             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;
       case VectorType.CurveLine:
         lineService.deleteCurveLine(vectorId);

+ 2 - 0
src/graphic/Layer.js

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