Repository navigation
Fix #541: a click on a selected object makes it the key object - #565
Merged
Merged
Conversation
With the Selection tool, a click (no drag, no modifier) on one object of a selection of several makes it the key object (select.key); a click on the key again lets it go. The key object is drawn with a thicker outline, Align aligns to it (the Align panel shows Align to Key Object while there is a key, and choosing Selection or Artboard lets it go), and object.align without `to` aligns to the key when there is one, so the Control bar's and the Properties panel's Align buttons do too. With a spacing, Distribute Spacing keeps the key object still and spaces the others from it, and it reports too few objects instead of indexing an empty list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A click on an object of a multi-object selection makes it the key object, which Align then aligns to.
crates/tools/src/select.rs): a press and release without a drag or modifier, on one object of a selection of several, runsselect.key {id}. Clicking the key again runsselect.key {}. Drags, Shift-clicks and single selections behave as before.object.alignwithouttoaligns to the key when there is one, so the Control bar, Properties panel and menu Align buttons follow it.object.distributeSpacingwith aspacingkeeps the key still and spaces the others from it. It now errors on fewer than two measurable objects instead of indexing an empty list. Command docs updated forselect.key,object.alignandobject.distributeSpacing. New message rows in es and it.Checked live: with two shapes selected, a click on the ellipse draws it with the thick outline, and the Align panel switches to Align to Key Object with the spacing field enabled.
Checks
cargo test -p vectorcraft-tools -p vectorcraft-engine -p vectorcraft-ui-egui,cargo clippyon those crates with--all-targets -- -D warnings,cargo fmt --all,cargo xtask wasm, i18n tests.🤖 Generated with Claude Code