Skip to content

Tracking Issue: Pen and Path tool improvements #1870

Open
@Keavon

Description

@Keavon

Much of this is explained/demonstrated in this detailed webcast: https://youtu.be/OmveqhzXJFg

Discord thread: https://discord.com/channels/731730685944922173/1319602515758682132

Miscellaneous (TODO: clean up and clarify this):

  • Click-dragging to box select from inside a shape (even if it's not filled) should not select all the shape's points and begin dragging them; it should allow the box selection just like outside the shape
  • Our current way of clicking another layer to make it selected should not happen unless it's a double-click, and if Shift is held, it adds or removes that layer
    • Double-clicking an already selected layer, without Shift held, will select all its points. Shift-selecting will deselect it. Shift-selecting a different deselected layer will add it to the selection. (With all points selected or deselected? Must respect existing point selection on other layers.)
  • There's a bug where clicking near one point will select the wrong point, or select that near point intermittently based on precise location in relation to that point

Path tool

When dragging a handle:

When dragging an anchor:

  • Alt (new since video was recorded), if held during the start of the click-drag, converts the anchor's handles to colinear and drags the handle pair instead of the anchor, keeping them equidistant unless Alt is released to temporarily return the opposite handle back to where it started before the Alt-drag began (which involves returning its colinear state back to what it was before). Should work with Tab to swap which is the dragged handle, so its opposite can be the one that's returned if Alt is temporarily released. Just Alt clicking but not dragging the anchor should remove both handles by setting them to zero length. (Add Path tool support for Alt-dragging an anchor to pull out a fresh equidistant handle pair #2496)
  • Shift, locks the drag to the nearer of the X or Y axes from its drag starting point. (If pressed before the drag begins, it shouldn't break Shift-clicking points to add to the selection.) (Add Path tool support for dragging along an axis when Shift is held #2449)
  • Ctrl (new since video was recorded), if pressed before the drag begins, should select and drag a zero-length handle out of its anchor locked to the angle of the opposite non-zero-length handle, which it should be made colinear to. This applies only to anchors with two handles where exactly one is zero-length. Otherwise, the key is ignored and the anchor is dragged per usual. One more scenario is where a non-endpoint anchor has no handles (they're both zero-length), if Ctrl and Alt (see previous bullet point) are both pressed before dragging, it locks the angle to that of the line perpendicular to the average of the two tangents (diagram) from that anchor to its adjacent curves. (Add Path tool support for Ctrl-dragging to pull out zero-length handles with angle locking #2620)
  • ‼️CtrlShift (updated since video was recorded which indicated this would use Alt) slides the anchor along its adjacent segment(s) while adjusting its handle(s) to best approximate the initial curvature. Since only the two handles may vary in length >= 0 and it must pass through the sliding point's starting position, there's only one dimension of freedom and a simple Newton's method optimization for error based on Hausdorff or Frechet distance should be fine, as far as the algorithm goes. (If pressed before the drag begins, it shouldn't break Shift-clicking points to add to the selection.)

When double-clicking an anchor (new since video was recorded):

  • Currently this swaps between smooth and sharp, but doesn't work if multiple handles are multi-selected to convert them all to smooth or sharp. If they're of mixed type, the specific one that's double clicked on should be the decider for the rest of them as to which they should all be swapped to. (Make the Path tool support multi-point conversion between smooth/sharp on double-click #2498)
  • If a single anchor is double clicked, and it has only one handle (the other is zero-length or doesn't exist), currently this converts it to sharp by removing the handle. But we want that to make the new handle colinear and extend it to an equal length as the present handle. Only if both handles are present, should double-clicking remove both handles like it does currently in that situation. And if both handles are gone, it should also do what it does now by restoring them as colinear. (Add Path tool support for Ctrl-dragging to pull out zero-length handles with angle locking #2620)

When clicking a segment (new since video was recorded):

When a single handle is selected:

Pen tool (completed)

When no drawing has begun yet (pointer is up):

  • (New since video was recorded) clicking a path's endpoint should begin drawing from it with an initial handle that's colinear and equidistant from the opposite handle, instead of the current behavior where clicking the endpoint begins drawing the segment with a zero-length handle. If the user wants the current behavior, they can simply click the endpoint anchor a second time to make the current segment's handle zero-length. This solves the pain point that switching away from the Pen tool, then back to it, causes a discontinuity at the previous endpoint where the handles can't easily be opposite each other like when drawing consecutive segments normally. (Make the Pen tool extend an endpoint by starting with a colinear, equidistant handle #2295)

When stretching out a segment to be placed (pointer is up):

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

Metadata

Metadata

Labels

Good First IssueGood for newcomersPaper CutA small UX annoyance we should strive to improve

Projects

Status

Ongoing Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions