Graph Lasso

unlisted

by Stymphalionn

Extends functionality of Graph View by adding a direct select lasso tool. Includes right-click tools.

Updated 5mo agoMIT
View on GitHub

Graph Lasso

Select multiple notes in Obsidian's core Graph or Local graph by drawing a marquee (rectangle) or lasso (freehand). Then right-click for batch actions: open all, tags, find & replace, links and clipboard utilities, Bases, or delete.

Author: Stymphalionn (github.com/stymphalionn)

What's new in 1.0.7

  • Subtract regions stay visible with a light red tint (no timed fade); Ctrl + drag is documented alongside Alt for Linux desktops where Alt-drag moves windows.
  • Selection overlay avoids clearing the lasso bitmap on noisy resizes and records modifier keys at pointer-down so subtract mode behaves more reliably.
  • Bulk find & replace preview: whole-word snippets match correctly; Apply stays disabled until you run a fresh Preview after any change; Enter in a find/replace field runs preview; preview rows open the note via double-click or right-click.
  • Command palette: Open architecture report opens a Markdown overview of plugin structure (handy for support and development).
  • Removed placeholder palette entries for future UMAP work until that feature exists.

Hotkeys (when the graph pane is focused)

InputAction
DragDraw selection (marquee or lasso, see settings).
Mouse wheelZoom (forwarded to the graph canvas).
Space (hold)Pan — overlay ignores pointer events while Space is held.
Middle mouse (hold / drag)Pan — same passthrough behavior as Space.
Shift + dragAdd to selection (multiple regions).
Alt + drag (or Ctrl + drag: some Linux desktops use Alt+drag to move windows)Subtract notes inside the region (subtract area stays tinted until you clear or redraw).
EscapeClear selection and turn the tool off.
Right-clickActions menu — choosing any action turns the tool off after it finishes (async actions resolve first).
Focus elsewhereSwitching to a non-graph pane turns the tool off.
Pointer leaves graph paneMoving the cursor outside the graph leaf (into another pane or sidebar) turns the tool off.

Default shape is lasso; change in settings or command palette (Graph select: use marquee / lasso).

Usage

  1. Open Graph or Local graph and focus that tab.
  2. Turn on the tool: command palette → Toggle graph select tool, or use the pin on the graph control strip (optional ribbon button in settings).
  3. Drag to select. Right-click for actions.

Settings

  • Show ribbon button — optional left ribbon toggle (off by default; graph toolbar is primary).
  • Mask opacity, lasso simplify, sequential-open delay.
  • Debug log to file (writes under .obsidian/plugins/graph-lasso/debug.log via the vault adapter).

Demo media

(Optional) Add a short GIF under docs/demo.gif and embed it here after you record one.

Roadmap

UMAP / embedding clustering — not scheduled in-plugin yet; placeholder commands were removed until a real workflow ships (likely as a companion plugin or a later major bump).

Develop

npm install
npm run build

Copy manifest.json, main.js, and styles.css into .obsidian/plugins/graph-lasso/ in your vault (or symlink), then reload Obsidian.

See OTHER_LASSO_TOOLS.md for how this compares to lasso/marquee tools elsewhere.

Caveats

Uses undocumented graph internals (view.renderer.nodes, Pixi circle positions). A future Obsidian update may break selection until the plugin is updated.

Graph toolbar placement follows the official graph-controls pattern; if your Obsidian build's DOM differs, the strip may fall back.

Bases: Create .base from selection writes YAML with file.path == "…" filters. Requires Obsidian Bases; empty or broken filters may need manual edit.

Tags: Remove only edits YAML tags: unless retag enables body #tag replace. Find & replace is literal / whole-word options—not full regex.

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.