Skip to content

Fix #483: Shift-drag marquees toggle the selection; the Lasso's Alt keeps the rest - #492

Merged
bflatastic merged 1 commit into
mainfrom
fix/issue-483
Oct 8, 2026
Merged

bflatastic merged 1 commit into
mainfrom
fix/issue-483

Conversation

@bflatastic

Copy link
Copy Markdown
Member

A Shift-drag marquee only ever added to the selection; as in Illustrator it now toggles what it reaches, so selected objects (or anchors) can be taken out with a marquee.

  • Selection tool: the Shift marquee runs select.toggle, which now takes {ids} too (each one toggles); a Shift-click on empty canvas still leaves the selection alone.
  • Direct Selection / Group Selection: the Shift marquee toggles the anchors inside it (select.anchorsMany mode toggle); a path left with none leaves the selection, one with all of them is selected whole again.
  • select.anchorsMany takes mode: "set"|"add"|"toggle"|"subtract" (add: true still means add; an unknown mode is a parameter error). Adding anchors of a path selected whole keeps it whole, and references outside the path are ignored.
  • Lasso: Shift adds and Alt subtracts through the same command, so an Alt lasso no longer drops selected type, groups and other non-path objects from the selection.
  • Docs (docs/mcp.md, with a pointer_gesture example), ROADMAP (Last updated, Selection bullet), command-sweep cases for the new modes.

Illustrator reference: Shift-click or Shift-drag around objects adds or removes them from the selection (Select objects); the Lasso adds with Shift and subtracts with Alt/Option (Select anchor points).

Checks

  • Rebased on d9fc3b6505bb185c7ecce05ab4b60b86da12822f (origin/main).
  • cargo fmt --all --check; cargo clippy -p vectorcraft-tools -p vectorcraft-engine -p vectorcraft-mcp --all-targets -- -D warnings: clean.
  • cargo test -p vectorcraft-tools -p vectorcraft-engine -p vectorcraft-mcp: all pass (tools 242, engine lib 1358, mcp lib 57, command sweep). New: select::shift_marquee_toggles, direct::shift_marquee_toggles_anchors, engine selection_shift_marquee_toggles_objects, direct_selection_shift_marquee_toggles_anchors (Group Selection too), lasso_shift_adds_and_alt_subtracts, MCP shift_marquee_gesture_toggles_the_selection. The three engine tests fail on main (Shift marquee added b instead of removing it; Direct Selection added; Alt lasso dropped the type).
  • cargo xtask layers, cargo xtask brands, cargo xtask wasm: OK; cargo check -p vectorcraft-engine --target x86_64-unknown-linux-gnu / aarch64-apple-darwin: OK.
  • Live (desktop app, control port ui.pointer + ui.screenshot): with two of three squares selected, a Shift marquee over the second and third leaves the first and third selected; a Direct Selection Shift marquee across the top edges toggles those anchors (first square partly selected, second joins with its top anchors).
  • MCP (vectorcraft-cli mcp): the documented pointer_gesture gives [a, c] from [a, b]; an Alt lasso keeps the selection; select.anchorsMany {mode: "bogus"} is a parameter error.

🤖 Generated with Claude Code

…eeps the rest

A Shift-drag marquee only ever added to the selection, so there was no way to
take some of the selected objects out with it. As in Illustrator, Shift-drag
now toggles what the marquee reaches: the selected ones are deselected, the
others selected, the rest of the selection stays.

- Selection tool: the Shift marquee runs select.toggle, which now also takes
  {ids} (each one toggles).
- Direct Selection and Group Selection: the Shift marquee toggles the anchors
  inside it (select.anchorsMany mode "toggle"); a path left with none leaves
  the selection, one with all of them is selected whole again.
- select.anchorsMany takes mode "set"|"add"|"toggle"|"subtract" (add: true is
  still mode add). Adding anchors of a path selected whole keeps it whole, and
  anchor references outside the path are ignored.
- Lasso: Shift adds and Alt subtracts through the same command, so an Alt lasso
  no longer drops selected type, groups and other non-path objects.
- Tests at the tool, engine (Session::pointer) and MCP (pointer_gesture) levels,
  command sweep cases for the new modes; docs/mcp.md and ROADMAP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bflatastic

Copy link
Copy Markdown
Member Author

Full cargo xtask ci passed on the integrated stack; merging.

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.

1 participant