|
@@ -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;
|