@mocanvas/editor · interface

BoundsSnapTranslateOptions

interface BoundsSnapTranslateOptions

Properties · 4

dragDelta: Vec

How far the gesture wants to move, before snapping.

initialSelectionPageBounds: Box

The dragged selection's page bounds as they were when the drag started.

initialSelectionSnapPoints: BoundsSnapPoint[]

The snap points the dragged selection offers, in page space at the start of the drag. Passed in rather than recomputed because they do not change during the gesture, and recomputing them per pointer move is the single most expensive thing snapping could do.

lockedAxis: "x" | "y" | null

An axis the gesture is constrained to, or null.

Mentioned here

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.