-
-
Notifications
You must be signed in to change notification settings - Fork 784
Add ability to start lasso select within object without dragging layers #2799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add ability to start lasso select within object without dragging layers #2799
Conversation
if handle_drag_from_anchor { | ||
if let Some((layer, point)) = shape_editor.find_nearest_point_indices(&document.network_interface, input.mouse.position, SELECTION_THRESHOLD) { | ||
// Check that selected point is an anchor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't change almost any of this logic. The diff just seems large because I moved the pieces from the if/else chain into a match statement
if this change is too involved and not preferred there is a simpler change here: #2798 |
I tested this and didn't find any obvious regressions @Keavon 👍 |
@hemu could you please resolve the merge conflict? I tried but it looks like it affects the structure of an if-else statement that changed. Thanks. Also, please mark this as ready for review and comment when you've completed this. I'm marking it as a draft for now while waiting the resolution. |
When beginning a lasso select from within an object, currently the behavior is to drag its layers. This PR updates this behavior such that a lasso select beginning within an object will remain a lasso selection over the existing layers.
Refactor select_tool and path_tool transition drag logic to determine an "intent" up front. This made it easier to incorporate the type of logic needed in this PR where the lasso select intent has priority over others, but its logic is shared with box select which has the lowest priority so it was hard to capture this in the existing if/else chain.
Part of #2647
NOTE: This is an alternate implementation compared to this simpler change: #2798
Before
graphite_fix_start_lasso_inside_before.mp4
After
graphite_fix_start_lasso_inside_after.mp4