gestures/wheel#

Variables#

OWN_WHEEL#

const OWN_WHEEL: "tilie-own-wheel" = "tilie-own-wheel"

Defined in: arranger/src/gestures/wheel.ts:19

The class of an overlay of the canvas that takes the plain wheel itself (ownWheel), so the canvas neither pans under it nor sees it; a zooming wheel still zooms the canvas there.


PAN_SPEED#

const PAN_SPEED: 0.5 = 0.5

Defined in: arranger/src/gestures/wheel.ts:9

Canvas pixels panned per pixel of wheel travel, Svelte Flow’s default.

Functions#

ownWheel()#

ownWheel(event): void

Defined in: arranger/src/gestures/wheel.ts:27

The wheel listener of an overlay of class OWN_WHEEL: a wheel with Ctrl or Cmd held (a touchpad pinch included) goes on to the canvas, which zooms as anywhere else; any other wheel stays with the overlay, which scrolls as the browser scrolls it.

Parameters#

event#

WheelEvent

Returns#

void


shiftWheel()#

shiftWheel(pan): Attachment<HTMLElement>

Defined in: arranger/src/gestures/wheel.ts:39

Shift+wheel pans horizontally. Svelte Flow, outside macOS, turns a Shift wheel’s vertical travel into horizontal travel, but Chromium and Firefox on Linux and Windows already report it as horizontal travel, which Svelte Flow would then discard; such an event is panned here instead, by pan(dx) screen pixels, before Svelte Flow and actively (Svelte’s own wheel listeners are passive).

Parameters#

pan#

(dx) => void

Returns#

Attachment<HTMLElement>