Skip to content

feat: bend curves by dragging and move segments once selected - #473

Merged
kostyafarber merged 2 commits into
mainfrom
feat/bend-curve-drag
Sep 30, 2026
Merged

kostyafarber merged 2 commits into
mainfrom
feat/bend-curve-drag

Conversation

@kostyafarber

Copy link
Copy Markdown
Collaborator

Summary

  • Dragging an unselected cubic segment now bends it without a modifier. Shift still snaps the handles to 45° steps and Alt keeps each handle's direction.
  • A segment translates only once it is selected: click it, then drag. Straight lines have nothing to bend, so dragging them still translates.
  • Cmd no longer affects bending. It keeps only the Cmd-hover upgrade preview and the Cmd-click upgrade on straight lines, so Cmd-hover over a cubic no longer shows the bend cursor.
  • The bend cursor follows the bending state, so it shows for the whole drag.

Risks

  • This narrows Align select and pen gestures with standard outline editing #465's bounding-box rule. An unselected cubic inside the selection's bounding box now bends instead of moving the selection. Unselected points, anchors, lines, and components inside the box still move the selection.
  • Alt-drag on an unselected cubic now bends with each handle's direction kept. Before, it duplicated the current selection.
  • A segment counts as selected only when the segment itself is selected. If both of its end points are selected but the segment is not, dragging it still bends it.

Issue

Closes #472

Testing

  • pnpm check (typecheck, lint, 1189 vitest tests) passed
  • Updated unit tests: plain-drag bend keeps the end points fixed, click-then-drag translates, bend lifecycle, Shift/Alt modifiers, undo/redo and cursor tests no longer hold Cmd
  • Updated e2e/editor.spec.ts "keeps custom cursors on the canvas while hovering and bending across sidebars" for the plain-drag bend. Not run locally; left to PR CI
  • Not yet verified by hand in the running app

🤖 Generated with Claude Code

Dragging an unselected cubic bends it without a modifier; a segment
translates only after it is selected. Cmd no longer affects bending and
keeps only the line upgrade preview and Cmd-click upgrade.
@kostyafarber kostyafarber added the release: nightly Run a Nightly build after this pull request merges label Sep 30, 2026
@kostyafarber
kostyafarber added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit 0509452 Sep 30, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: nightly Run a Nightly build after this pull request merges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bend curves by dragging and translate segments only once selected

1 participant