xushiting 2 năm trước cách đây
mục cha
commit
cf6f42611f
1 tập tin đã thay đổi với 3 bổ sung13 xóa
  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 },
       };
       stateService.setFocusItem(focusItem);
+      this.uiControl.focusVector = focusItem;
       stateService.clearDraggingItem();
     }
 
@@ -438,6 +439,7 @@ export default class Layer {
       case LayerEvents.PanBackGround:
         needAutoRedraw = true;
         stateService.clearFocusItem();
+        this.uiControl.focusVector = null;
         this.uiControl.currentUI = null;
         break;
       case LayerEvents.MoveRoadPoint:
@@ -549,19 +551,6 @@ export default class Layer {
         }
         this.history.save();
         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");
@@ -821,6 +810,7 @@ export default class Layer {
   exit() {
     stateService.clear();
     this.uiControl.clearUI();
+    this.uiControl.focusVector = null;
   }
 
   stopAddVector() {