1.2.3
1.2.3
Double-click now edits a label instead of creating a new one
The first click of a double-click selects the label, and selecting redraws the canvas from scratch. That redraw destroys and
rebuilds the very <text> node the pointer was sitting on, so by the time the double-click was dispatched the browser had
retargeted it to the <svg>. The handler asked the event which label was hit, was told "none", and fell through to its
"empty area" branch — producing a second label next to the one you meant to edit.
Labels are now resolved by position, using the same hit test a single click uses, so a double-click and a single click can
never disagree about what is under the pointer. Where labels overlap, the one you have selected is edited.
To edit a label: double-click it. To add one: double-click empty space.
Review checklist
The two Errors reported against 1.2.2 came from this plugin's own attempt to silence a lint warning, and are now resolved:
- Obsidian's linter does not allow
prefer-create-elto be disabled. The directives added in 1.2.2 are removed and the
underlying warning stands, with the reason recorded in the source:createElbuilds HTML-namespace nodes, so an SVG
constructed with it does not render, and there is no SVG equivalent. - Also cleared: a redundant type assertion, a missing
voidon a toolbar handler, and an untyped settings load.
No format changes. Right-click still deletes a label in one action, and Ctrl/Cmd+Z brings it back.