소스 검색

fix: 取消选中基准点

jinx 2 년 전
부모
커밋
122ab3e5b1
4개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      server/test/a0k4xu045_202305311600080410/attach/sceneStore
  2. 2 1
      src/graphic/Controls/AddPoint.js
  3. 1 0
      src/graphic/Layer.js
  4. 1 0
      src/graphic/Service/PointService.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 2 - 1
src/graphic/Controls/AddPoint.js

@@ -18,8 +18,10 @@ export default class AddPoint {
   }
 
   buildPoint(position) {
+
     if ((Settings.selectLocationMode == Constant.angleLocationMode || Settings.selectLocationMode == Constant.allLocationMode) && Settings.basePointIds.length == 1) {
       Settings.selectBasePointId = Settings.basePointIds[0];
+      console.error(Settings.basePointIds.length)
     }
     let newPoint;
     if (Settings.selectPointCategory == VectorCategory.Point.BasePoint) {
@@ -51,7 +53,6 @@ export default class AddPoint {
         newPoint.getCategory() == VectorCategory.Point.TestPoint
       ) {
         this.testPointIds.push(newPoint.vectorId);
-        console.error(this.testPointIds)
       }
     }
     listenLayer.clear();

+ 1 - 0
src/graphic/Layer.js

@@ -956,6 +956,7 @@ export default class Layer {
         stateService.clearFocusItem();
         this.uiControl.focusVector = null;
         this.uiControl.currentUI = null;
+        Settings.selectBasePointId = null;
         break;
       case LayerEvents.MoveRoadPoint:
         if (!draggingItem || !draggingItem.vectorId) {

+ 1 - 0
src/graphic/Service/PointService.js

@@ -11,6 +11,7 @@ export default class PointService {
   create(position, vectorId) {
     let point = new Point(position, vectorId);
     dataService.addPoint(point);
+    this.updateBasePointIds()
     return point;
   }