mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-30 19:59:38 +02:00
cmd/ctrl + scroll now pans the canvas up/down instead of zooming at the cursor. The catch: a trackpad pinch reports as a wheel with ctrlKey set, indistinguishable at the event level from a real Ctrl+wheel. Gate on the physically-held key (cmdRef, tracked via keydown): a real modifier down pans; a pinch has ctrlKey without any keydown, so it still zooms at the cursor. Plain wheel continues to zoom at the viewport center. The webview-forwarded cmd/ctrl+wheel path (canvas-wheel-zoom) stays cursor-zoom — that channel can't tell a pinch from a held key, and keeping it zoom preserves pinch-to-zoom while hovering a browser card.