mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-30 04:57:54 -06:00
The Composition and Layer viewers took every scroll as a zoom, so a trackpad could not pan. A trackpad's two-finger scroll now pans; a pinch, Ctrl/Cmd+scroll, a mouse wheel and Alt + a trackpad scroll zoom around the pointer. Where the platform names the device (egui's MouseWheelSource, macOS), that decides. Elsewhere browsers and some high-resolution wheels report a mouse wheel in points, as a trackpad does, so the unit alone doesn't decide. A scroll in points pans only once it has shown it is a trackpad: a touch phase, movement on both axes at once, or a pinch. That holds until a wheel scrolls in lines. Until then the vertical part zooms and the horizontal part pans. ui.scroll gains unit (point|line), source (wheel|trackpad) and pinch so agents can drive both gestures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>