Skip to content

snapMove()

function snapMove(
rect,
others,
bounds,
options
): object;

Snaps a moved rectangle: first to edges and centers of others (and the band bounds), otherwise to the grid. Returns the snapped rect and guides.

Parameter Type
rect Rect
others Rect[]
bounds Rect
options SnapOptions

object

Name Type
guides Guide[]
rect Rect