Skip to content

[2/2] feat: zoom the timeline with a pinch - #329

Merged
dazzatronus merged 1 commit into
feat/touch-long-pressfrom
feat/touch-timeline-pinch
Dec 2, 2026
Merged

dazzatronus merged 1 commit into
feat/touch-long-pressfrom
feat/touch-timeline-pinch

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Two fingers on the timeline now zoom it about their midpoint, within the zoom slider's 10–200 px/s, and moving them together also scrolls. Before, a pinch zoomed the whole page and left the timeline as it was.

The timeline root takes touch-action: pan-x pan-y, so browser pinch-zoom is off over the timeline, toolbar included. During a pinch the fingers' presses and moves are stopped, so they can't select, seek or lift. Their releases still reach every handler, so a playhead drag interrupted by a pinch ends cleanly. Safari's gesturestart and gesturechange are prevented only during a touch pinch, so trackpad pinch on macOS is unchanged.

Known limit: a second finger that lands on the ruler seeks the playhead before the pinch starts.

Verify: on both devices, a two-finger spread from 60 to 200 px zooms the timeline from 50 to about 166 px/s, so clips grow ×3.3, and visualViewport.scale stays 1. On 2.34.0 the same pinch zooms the page to 2.47 (iPhone) or 2.62 (Pixel). Panning and the long press still work. npx jest: 2727 pass.

# PR Adds Why it is separate
1/2 #327 Long press lifts a clip Works and releases alone
2/2 #329 (this PR) Pinch zooms the timeline Needs the lift's cancel for a second finger

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

@dazzatronus
dazzatronus added this pull request to stack #331 December 2, 2026 06:30
@dazzatronus
dazzatronus merged commit 97ed07c into main Dec 2, 2026
1 check passed
@dazzatronus
dazzatronus deleted the feat/touch-timeline-pinch branch December 2, 2026 06:34
github-actions Bot pushed a commit that referenced this pull request Dec 2, 2026
# [2.35.0](v2.34.0...v2.35.0) (2026-12-02)

### Features

* add canvas zoom buttons for touch screens ([#328](#328)) ([4869fab](4869fab))
* lift a clip with a long press on touch ([#327](#327)) ([70a1690](70a1690))
* pinch and pan the canvas on touch ([#330](#330)) ([7ac2c33](7ac2c33))
* zoom the timeline with a pinch ([#329](#329)) ([97ed07c](97ed07c))
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.35.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