Skip to content

Fix freeze when selecting multiple blocks - #354

Merged
milanofthe merged 1 commit into
mainfrom
fix/multi-select-freeze
Nov 13, 2026
Merged

milanofthe merged 1 commit into
mainfrom
fix/multi-select-freeze

Conversation

@milanofthe

Copy link
Copy Markdown
Member

Fixes #353.

Each selected block wrote itself into a single global highlight store from an effect, and the highlight refresh read the edge highlight map inside that effect. With two or more blocks selected, the effects re-triggered each other until Svelte aborted with effect_update_depth_exceeded and the page froze (Ctrl+A or Shift+drag).

  • Edge highlights are computed from the canvas selection in handleSelectionChange, for all selected blocks; an edge between two selected blocks takes the source block's color.
  • The refresh runs untracked, so no effect depends on the highlight map.
  • selectedNodeHighlight and the per-node effects are removed; the node color (including the missing-type red) is one function, nodeColor, used by blocks, bus blocks and the highlighter.

@milanofthe
milanofthe merged commit d4dffc4 into main Nov 13, 2026
4 checks passed
@milanofthe
milanofthe deleted the fix/multi-select-freeze branch November 13, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with Selecting Multiple or All Blocks

1 participant