TLCameraConstraints
Table of contents
interface TLCameraConstraints {}Properties
baseZoom
The camera's base for its zoom steps.
default: Sets the initial zoom to 100%. -fit-x: The x axis will completely fill the viewport bounds. -fit-y: The y axis will completely fill the viewport bounds. -fit-min: The smaller axis will completely fill the viewport bounds. -fit-max: The larger axis will completely fill the viewport bounds. -fit-x-100: The x axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller. -fit-y-100: The y axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller. -fit-min-100: The smaller axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller. -fit-max-100: The larger axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
baseZoom:
| "default"
| "fit-max-100"
| "fit-max"
| "fit-min-100"
| "fit-min"
| "fit-x-100"
| "fit-x"
| "fit-y-100"
| "fit-y";behavior
The behavior for the constraints for both axes or each axis individually.
free: The bounds are ignored when moving the camera. - 'fixed': The bounds will be positioned within the viewport based on the origin -contain: The 'fixed' behavior will be used when the zoom is below the zoom level at which the bounds would fill the viewport; and when above this zoom, the bounds will use the 'inside' behavior. -inside: The bounds will stay completely within the viewport. -outside: The bounds will stay touching the viewport.
behavior:
| "contain"
| "fixed"
| "free"
| "inside"
| "outside"
| {
x: "contain" | "fixed" | "free" | "inside" | "outside";
y: "contain" | "fixed" | "free" | "inside" | "outside";
};bounds
The bounds (in page space) of the constrained space
bounds: BoxModel;initialZoom
The camera's initial zoom, used also when the camera is reset.
default: Sets the initial zoom to 100%. -fit-x: The x axis will completely fill the viewport bounds. -fit-y: The y axis will completely fill the viewport bounds. -fit-min: The smaller axis will completely fill the viewport bounds. -fit-max: The larger axis will completely fill the viewport bounds. -fit-x-100: The x axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller. -fit-y-100: The y axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller. -fit-min-100: The smaller axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller. -fit-max-100: The larger axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
initialZoom:
| "default"
| "fit-max-100"
| "fit-max"
| "fit-min-100"
| "fit-min"
| "fit-x-100"
| "fit-x"
| "fit-y-100"
| "fit-y";origin
The origin for placement. Used to position the bounds within the viewport when an axis is fixed or contained and zoom is below the axis fit.
origin: VecLike;padding
The padding inside of the viewport (in screen space)
padding: VecLike;Prev
TLBrushPropsNext
TLCameraMoveOptions