@mocanvas/editor · interface

TLGridStep

interface TLGridStep

One band of the alignment grid.

The grid is not a single spacing: at low zoom a 1px lattice is a grey wash, and at high zoom a 64px one is useless. Each band says which zoom range it covers and how far apart its lines are, and the renderer picks the band whose range contains the current zoom, fading between neighbours.


Properties · 3

mid: number

Zoom at which this band is drawn at full strength.

min: number

Lowest zoom this band applies at.

step: number

Line spacing, in page units.

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.