@mocanvas/editor · interface
interface TLCameraConstraintsA region the camera is kept over, plus how zoom relates to it.
Properties · 6
baseZoom?: TLCameraConstraintsZoomThe 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: BoxLikeThe constrained region, in page space.
initialZoom?: TLCameraConstraintsZoomThe 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.