editor: better rendering of helper outlines

This commit is contained in:
Joeri Exelmans 2025-10-17 11:34:49 +02:00
parent 9401c02800
commit e8fda9bdf0
8 changed files with 95 additions and 116 deletions

View file

@ -6,9 +6,9 @@ export function TextSVG(props: {text: Text, error: TraceableError|undefined, sel
"data-uid": props.text.uid,
"data-parts": "text",
textAnchor: "middle" as "middle",
className:
(props.selected ? "selected":"")
+(props.highlight ? " highlight":""),
className: "draggableText"
+ (props.selected ? " selected":"")
+ (props.highlight ? " highlight":""),
}
let textNode;
@ -36,6 +36,8 @@ export function TextSVG(props: {text: Text, error: TraceableError|undefined, sel
if (newText) {
props.onEdit(newText);
}
}}
>{textNode}</g>;
}}>
{textNode}
<text className="draggableText helper" textAnchor="middle" data-uid={props.text.uid} data-parts="text">{props.text.text}</text>
</g>;
}