1.2.2
1.2.2
Fixes right-click deleting a label
Obsidian registers a capture-phase listener on window that intercepts every real context-menu
event and stops it propagating. The chart's own contextmenu handler therefore never ran — the hit
test still resolved, which is why the cursor changed and the feature looked alive, but nothing was
deleted.
Right-click is now handled on pointerdown instead, which Obsidian does not intercept and which
dragging already relies on.
To delete a label: click it, then press Delete, use Label → Delete label, or right-click
it. All three work; none of them depends on the context-menu event surviving.
Review checklist
Cleared ahead of the community-directory review:
- The
onunloadhandler no longer detaches leaves — Obsidian resets a leaf to its default position on
reload, so a user who moved the pane lost that placement every time. - Command ids and names no longer duplicate the plugin id and name (Obsidian renders both itself).
Renamed: Create a blank chart, Create from a worked example, Export as an image,
Open the active chart. Any custom hotkey pointing at the old ids needs updating. - Unused fields, dead code and redundant assertions removed.
js-yamlreplaced withyaml.
No format changes.