Browse Source

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

xushiting 2 năm trước cách đây
mục cha
commit
955bfdf239
1 tập tin đã thay đổi với 6 bổ sung7 xóa
  1. 6 7
      src/graphic/Renderer/Draw.js

+ 6 - 7
src/graphic/Renderer/Draw.js

@@ -1164,13 +1164,6 @@ export default class Draw {
     this.context.save();
     const [_, foo] = help.setVectorStyle(this.context, vector);
 
-    let select = false;
-    const geo = stateService.getFocusItem();
-    if (geo) {
-      const realVector = dataService.getGeo(geo.type, geo.vectorId);
-      select = realVector && realVector.linkedTextId === vector.vectorId;
-    }
-
     this.context.fillStyle = vector.color;
     this.context.textBaseline = "bottom";
     this.context.font = `${
@@ -1182,6 +1175,12 @@ export default class Draw {
 
     this.context.fillText(vector.value, bound[3].x, bound[3].y);
 
+    let select = false;
+    const geo = stateService.getFocusItem();
+    if (geo) {
+      const realVector = dataService.getGeo(geo.type, geo.vectorId);
+      select = realVector && realVector.linkedTextId === vector.vectorId;
+    }
     if (select || foo) {
       this.context.beginPath();
       const padding = 2 * coordinate.ratio;