瀏覽代碼

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

xushiting 2 年之前
父節點
當前提交
955bfdf239
共有 1 個文件被更改,包括 6 次插入7 次删除
  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;