Skip to content
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

Improve Pen tool handle dragging with Tab swapping, Ctrl angle locking, and directly dragging the closing endpoint in handle #2452

Merged
merged 34 commits into from
Apr 8, 2025

Conversation

0SlowPoke0
Copy link
Contributor

@0SlowPoke0 0SlowPoke0 commented Mar 17, 2025

Part of #1870

Added features:

  • Holding Ctrl while closing a path now locks the end handle to the angle of the opposite handle of the endpoint.

When dragging the handles of the segment being placed (pointer is down):

  • Tab swaps to dragging the opposite handle (native: teleports the cursor / web: enters pointer lock and draws a fake cursor at the new location)
  • If the current segment is closing the shape by connecting to its start point, the handle that's being dragged should be the closing handle, not a fake handle on the opposite side, and all the above shortcuts should work on that anchor/handle group spanning the start/end point (Tab will modify the shape of the first segment while the current/final segment is still in-progress)

Other issues fixed:

  • When joining paths, switching between them, and clicking the handles of joined endpoints, the opposite handles now correctly:

    first.mp4
  • Handles that appeared colinear but were not when using the path tool and dragging are now displayed correctly.

  • When dragging a handle from the start of the segment and aborting the GRS it moves the end handle of segment:

    second.mp4
  • Fixed this bug: https://files.keavon.com/-/PeachpuffEveryAfricanporcupine/capture_80_.mp4

@0SlowPoke0 0SlowPoke0 marked this pull request as ready for review March 20, 2025 03:24
@0SlowPoke0 0SlowPoke0 marked this pull request as draft March 21, 2025 08:31
@0SlowPoke0 0SlowPoke0 marked this pull request as ready for review March 27, 2025 16:29
@0SlowPoke0 0SlowPoke0 changed the title Pen refactor Improving Pen tool Mar 27, 2025
@Keavon
Copy link
Member

Keavon commented Mar 28, 2025

!build

Copy link

📦 Build Complete for 3a73690
https://d8bf6eec.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Mar 28, 2025

  • Drawing a brand new path with the Pen tool, when I'm dragging from the initial point in my first mousedown, shouldn't let Tab work because there is no opposite handle to swap to.

  • Holding Ctrl while closing a path now locks the end handle to the angle of the opposite handle of the endpoint.

    This has a few edge cases, here's a webcast with audio explaining them.

@Keavon
Copy link
Member

Keavon commented Mar 30, 2025

!build

Copy link

📦 Build Complete for 5b1ba81
https://c5ffedea.graphite.pages.dev

@Keavon Keavon force-pushed the master branch 4 times, most recently from aa7ff13 to e11b57a Compare April 6, 2025 11:41
@Keavon
Copy link
Member

Keavon commented Apr 7, 2025

!build

Copy link

github-actions bot commented Apr 7, 2025

📦 Build Complete for 6ca6f7f
https://ac866ddd.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Apr 7, 2025

  • We still have an unstable handle direction issue. I hold Ctrl before dragging out from the endpoint anchor but it's unstable when hovering within snapping distance of the anchor:

    capture_9_.mp4
  • When clicking an endpoint to extend it, I see we now correctly use R to rotate the colinear pair. But then after using R several times repeatedly, it just seems to randomly break the colinearity without doing anything different from the previous several times:

    capture_8_.mp4

@Keavon
Copy link
Member

Keavon commented Apr 8, 2025

!build

Copy link

github-actions bot commented Apr 8, 2025

📦 Build Complete for ff34454
https://7e257424.graphite.pages.dev

@Keavon Keavon changed the title Improving Pen tool Improve Pen tool handle dragging with Tab swapping, Ctrl angle locking, and directly dragging the closing endpoint in handle Apr 8, 2025
@Keavon Keavon merged commit 6a8386d into GraphiteEditor:master Apr 8, 2025
4 checks passed
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.

2 participants