xushiting 2 роки тому
батько
коміт
cf6f42611f
1 змінених файлів з 3 додано та 13 видалено
  1. 3 13
      src/graphic/Layer.js

+ 3 - 13
src/graphic/Layer.js

@@ -423,6 +423,7 @@ export default class Layer {
         cursor: { x: this.lastX, y: this.lastY },
         cursor: { x: this.lastX, y: this.lastY },
       };
       };
       stateService.setFocusItem(focusItem);
       stateService.setFocusItem(focusItem);
+      this.uiControl.focusVector = focusItem;
       stateService.clearDraggingItem();
       stateService.clearDraggingItem();
     }
     }
 
 
@@ -438,6 +439,7 @@ export default class Layer {
       case LayerEvents.PanBackGround:
       case LayerEvents.PanBackGround:
         needAutoRedraw = true;
         needAutoRedraw = true;
         stateService.clearFocusItem();
         stateService.clearFocusItem();
+        this.uiControl.focusVector = null;
         this.uiControl.currentUI = null;
         this.uiControl.currentUI = null;
         break;
         break;
       case LayerEvents.MoveRoadPoint:
       case LayerEvents.MoveRoadPoint:
@@ -549,19 +551,6 @@ export default class Layer {
         }
         }
         this.history.save();
         this.history.save();
         break;
         break;
-      // case LayerEvents.AddTag:
-      //   needAutoRedraw = true;
-      //   let tag = dataService.getTag(draggingItem.vectorId);
-      //   tag.setAdding(false);
-      //   focusItem = {
-      //     vectorId: draggingItem.vectorId,
-      //     type: draggingItem.type,
-      //     cursor: { x: this.lastX, y: this.lastY },
-      //   };
-      //   stateService.setFocusItem(focusItem);
-      //   this.history.save();
-      //   this.uiControl.currentUI = focusItem.type;
-      //   break;
     }
     }
 
 
     this.setEventName("mouseUp");
     this.setEventName("mouseUp");
@@ -821,6 +810,7 @@ export default class Layer {
   exit() {
   exit() {
     stateService.clear();
     stateService.clear();
     this.uiControl.clearUI();
     this.uiControl.clearUI();
+    this.uiControl.focusVector = null;
   }
   }
 
 
   stopAddVector() {
   stopAddVector() {