Repository navigation
feat: pinch, pan and double-tap zoom on opened media - #557
Merged
Merged
Conversation
Performance: ✅ every row is within its limitMain
|
vaakx-dev
force-pushed
the
sand/image-html-pinch-zoom
branch
from
November 24, 2026 13:34
6e3bf1b to
4ecf330
Compare
Images in the viewer and full-screen HTML pages now zoom with two fingers around the pinch point, pan with one finger while zoomed, and double-tap between fit and a closer look. Ctrl+wheel and trackpad pinch zoom pages on desktop; the wheel keeps zooming images. A page inside the sandboxed frame relays its pinches to the host, so the frame keeps its own scrolling and taps.
vaakx-dev
force-pushed
the
sand/image-html-pinch-zoom
branch
from
November 24, 2026 13:44
4ecf330 to
352736a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pinch, pan and double-tap zoom for images in the viewer and for full-screen HTML pages, on phones and in the Android app.
What
gesture/zoom.ts): two-finger pinch around the pinch point, double-tap, and wheel zoom (any wheel, or only Ctrl+wheel and trackpad pinch where the wheel scrolls). Taps on links, buttons and fields don't count toward a double-tap.sand/zoomable,sand/zoom-by,sand/zoom-toggle). The host checks the messages and maps frame points to the screen. Inline pages in the chat keep the old behavior.plugins/ui/chat/html/test/web/zoom.ts, added totest:phone.Why
Verification
bun test plugins/ui/chat/html/test/web/zoom.tsat 390×844 with touch, using real multi-touch through CDP:bunx tsc,vrui-check,scripts/deps.ts,scripts/comments.ts,bun testfor kit, html and images, and the kit gallery phone test all pass.