Repository navigation
Fix #593: anchors and handle ends are easier to grab than the segments through them - #612
Merged
Merged
Conversation
…s through them An anchor was picked within the selection tolerance (3 px), the same reach as its segments: a press a little off the anchor's 5 px square took the curve instead. - `ToolContext::point_tol`: anchors and direction handle ends are picked within the selection tolerance, but at least 2 px past the drawn point (4.5 px at the default Size 3, more with a larger Size). Anchors are tested before segments, so where both are within reach the anchor wins. - Direct Selection (presses, Highlight anchors on mouse over, blend spine points and handles), the Anchor Point, Delete Anchor Point and Scissors tools, and the Pen (its Alt conversions; its close/continue reach stays 5 px unless the points are drawn larger) use it. Segments, objects and frame edges keep the selection tolerance. - Of the topmost path with anchors in reach, the nearest anchor is picked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 8, 2026
bflatastic
added a commit
that referenced
this pull request
Oct 8, 2026
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.
Anchors are easier to grab with Direct Selection and the anchor tools: a press just off an anchor no longer slips onto the curve.
Cause: an anchor was picked only within the selection tolerance (3 px), the same reach as its segments. The anchor square is 5 px wide, so a press 3.5 px from its centre, still visually on the point's edge, grabbed the curve instead.
Fix:
ToolContext::point_tolsets how far a press reaches for anchors and direction-handle ends: at least 2 px past the drawn point, or the Tolerance preference if that is larger.anchor_size(Selection & Anchor Display › Size) is passed to the tools.Test
anchors_are_picked_before_the_segments_through_them:Checked live on a curved path at 236%:
Checks
cargo test -p vectorcraft-tools -p vectorcraft-engine -p vectorcraft-ui-egui.cargo clippy --all-targets -- -D warningsfor those three crates.cargo fmt --all,cargo xtask wasm.🤖 Generated with Claude Code