computeFitTransform
computeFitTransform(
bounds,size,padding,limits):ViewportTransform
Defined in: src/components/primitives/viewport/viewportMath.ts:22
Compute a transform that fits bounds (in world coordinates) into the
viewport size, with optional uniform inner padding in screen pixels.
The resulting transform preserves aspect ratio (uniform zoom on both axes) and centers the content within the viewport.
Parameters
bounds
size
padding
number
limits
ZoomLimits