Skip to content

1.2.2

Choose a tag to compare

@yanqingwang yanqingwang released this 03 Oct 23:44
· 4 commits to main since this release

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 onunload handler 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-yaml replaced with yaml.

No format changes.