Skip to content

[2/2] feat: pinch and twist the selected canvas clip on touch - #336

Merged
dazzatronus merged 1 commit into
feat/touch-canvas-handlesfrom
feat/touch-pinch-clip
Dec 3, 2026
Merged

dazzatronus merged 1 commit into
feat/touch-canvas-handlesfrom
feat/touch-pinch-clip

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Phone editors resize the selected object when you pinch it; Studio zoomed the canvas.

What a two-finger gesture does:

  • First finger on the selected clip: the pinch resizes the clip about its centre, and a twist rotates it.
  • First finger anywhere else: it zooms and pans the canvas, as before.

How the resize is written:

  • Like a corner drag, it writes width, height and fit: contain, never scale.
  • It keeps the clip's shape at the size limits.
  • It never enlarges a clip that is already under the 50 px minimum.

Rotation ignores the first 5° of twist, so resizing doesn't tilt the clip, then snaps as the rotation handle does.

Undo: each gesture is one undo step. A pinch records nothing if it changes nothing, is cancelled, or the clip is deselected mid-gesture. A clip with a keyframed offset falls back to zooming the canvas.

The commit block moved unchanged from onPointerUp into a shared commit().

This PR is 605 delta lines; about 395 are tests.

Verify:

  • On both devices, a ×2 spread starting on the selected image clip:
    • doubles its width and height;
    • leaves fit: contain and scale 1 and keeps the centre fixed;
    • is restored by one undo.
  • A twist of about 30° rotates it 24.8°.
  • A pinch starting on empty canvas zooms the canvas ×2.67 and leaves the clip alone.
  • visualViewport.scale stays 1.
# PR Adds Why it is separate
1/2 #335 Touch-sized handles; cancelled touches leave nothing behind Works alone
2/2 #336 (this PR) Pinch and twist the selected clip Builds on the first PR's touch claim and cancel

Merge bottom-up. Retarget the 2/2 PR to main after the 1/2 lands.

@dazzatronus
dazzatronus added this pull request to stack #339 December 3, 2026 10:49
@dazzatronus
dazzatronus merged commit e77dc9f into main Dec 3, 2026
1 check passed
github-actions Bot pushed a commit that referenced this pull request Dec 3, 2026
# [2.36.0](v2.35.0...v2.36.0) (2026-12-03)

### Bug Fixes

* keep the drag ghost under its clip when the timeline is scrolled ([#337](#337)) ([8157710](8157710))

### Features

* adapt the timeline toolbar to touch layouts ([#334](#334)) ([9ffcac0](9ffcac0))
* make canvas selection handles easier to hit on touch ([#335](#335)) ([0f0fcac](0f0fcac))
* pinch and twist the selected canvas clip on touch ([#336](#336)) ([e77dc9f](e77dc9f))
* show a clip as lifted during a long press ([#333](#333)) ([122a661](122a661))
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.36.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant