Give canvas pans momentum #15

Merged
reudy merged 1 commit from momentum-pan into main 2026-09-30 23:18:25 +02:00

1 commit

Author SHA1 Message Date
9b13dee725 Give canvas pans momentum
Releasing a pan now lets the view glide on in the drag's direction,
slowing under exponential drag (time constant GLIDE_TAU = 325 ms, so it
coasts about 325 px per 1 px/ms of release speed). Only the position
moves; the zoom is untouched. A drag that stops before lifting doesn't
glide. Touching the canvas, wheel, zoom or fit stops a glide.

Applies to finger, mouse (middle/space/background drag) and pen pans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015cuSqnxerdvXU934U9DddL
2026-09-30 19:38:57 +00:00