Skip to content

Fix Shift constraint to start from snapped position when dragging points (#2753)#3690

Draft
afrdbaig7 wants to merge 1 commit intoGraphiteEditor:masterfrom
afrdbaig7:fix/path-tool-shift-constraint
Draft

Fix Shift constraint to start from snapped position when dragging points (#2753)#3690
afrdbaig7 wants to merge 1 commit intoGraphiteEditor:masterfrom
afrdbaig7:fix/path-tool-shift-constraint

Conversation

@afrdbaig7
Copy link
Contributor

Fixes #2753.

When dragging a point and pressing Shift to constrain movement, the constraint was starting from the original drag position instead of the snapped position, which caused an unexpected jump.

This PR fixes that by locking the constraint origin when Shift is first pressed and using the snapped mouse position, so constrained movement behaves consistently even after snapping or axis changes.

The behavior when starting a drag with Shift, releasing and re-pressing Shift, and normal dragging remains unchanged. All existing tests pass.

@afrdbaig7 afrdbaig7 force-pushed the fix/path-tool-shift-constraint branch from 4f288e1 to 469e5fb Compare February 1, 2026 04:31
…teEditor#2753)

When constraining movement with Shift during a drag, the constraint now starts
from the point’s snapped position rather than the original drag start. This
makes constrained movement behave more intuitively when snapping is active.

The fix keeps the constraint origin stable on the first Shift press and uses
the snapped mouse position so the origin doesn’t change during axis switches.
@Keavon Keavon force-pushed the fix/path-tool-shift-constraint branch from 469e5fb to 8c3ffd0 Compare February 14, 2026 06:34
@Keavon
Copy link
Member

Keavon commented Feb 14, 2026

This is letting me move it around while the snap is happening, so I'm not sure what's going on. Draw a bunch of random layers to create a bunch of snapping points, then drag an anchor over another anchor and hold Shift, then keep dragging and you'll see that it doesn't remain constrained to the horizontal or vertical line defined by the snapping point that was set upon pressing Shift in that moment the key was depressed.

@Keavon Keavon marked this pull request as draft February 14, 2026 06:37
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.

Path tool dragging, then pressing Shift to constrain horiz./vert., should begin from a snapping point

2 participants