Pan-on-drag tool. Registered in both the active slot (sticky, H key)
and the hotkey slot (momentary, hold space).
Drag handlers compute pan deltas inline. View is read from ctx.view at
gesture start and written via ctx.setView on every move — so the tool
works with both controlled and uncontrolled Canvas viewport modes
without any extra wiring.
Sign convention: dragging the mouse right moves the canvas content right
relative to the viewport — i.e. the camera moves left. So the new view
is { x: startView.x - dx, y: startView.y - dy }.
Pan-on-drag tool. Registered in both the active slot (sticky,
Hkey) and the hotkey slot (momentary, holdspace).Drag handlers compute pan deltas inline. View is read from ctx.view at gesture start and written via ctx.setView on every move — so the tool works with both controlled and uncontrolled Canvas viewport modes without any extra wiring.
Sign convention: dragging the mouse right moves the canvas content right relative to the viewport — i.e. the camera moves left. So the new view is
{ x: startView.x - dx, y: startView.y - dy }.