@mocanvas/editor · interface

TLCameraConstraints

interface TLCameraConstraints

A region the camera is kept over, plus how zoom relates to it.


Properties · 6

baseZoom?: TLCameraConstraintsZoom

The zoom that counts as 1; zoomSteps are multiples of it.

behavior?: "free" | "contain" | "inside" | "outside" | "fixed"

How the camera behaves at the edges of the bounds on each axis.

bounds: BoxLike

The constrained region, in page space.

initialZoom?: TLCameraConstraintsZoom

The zoom to open at.

origin?: {

Where the bounds sit in the viewport when smaller than it; 0.5 centres.

padding?: number | {

Screen-space padding kept between the bounds and the viewport edges.

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.