|
@@ -24,6 +24,7 @@ export const help = {
|
|
|
[stateService.getDraggingItem(), "Dragging"],
|
|
|
[stateService.getFocusItem(), "Focus"],
|
|
|
];
|
|
|
+ console.log(itemsEntry);
|
|
|
let currentAttr;
|
|
|
|
|
|
//console.log(itemsEntry)
|
|
@@ -1162,6 +1163,14 @@ export default class Draw {
|
|
|
drawText(vector) {
|
|
|
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 = `${
|
|
@@ -1173,7 +1182,7 @@ export default class Draw {
|
|
|
|
|
|
this.context.fillText(vector.value, bound[3].x, bound[3].y);
|
|
|
|
|
|
- if (foo) {
|
|
|
+ if (select || foo) {
|
|
|
this.context.beginPath();
|
|
|
const padding = 2 * coordinate.ratio;
|
|
|
this.context.moveTo(bound[0].x - padding, bound[0].y - padding);
|