Skip to content

Function: resolvePlacement() ​

resolvePlacement(box, viewWidth, viewHeight, options?): SSPlacement

Defined in: src/Placement.ts:94

Put box into a viewWidth x viewHeight view.

An absent or zero-sized box, or a zero-sized view, leaves nothing to divide by: the fit is skipped and the result is the unfitted placement — scale 1, origin at the view's centre — as fit: 'none' gives, not an error.

Parameters ​

box ​

SSPlacementBox | null | undefined

viewWidth ​

number

viewHeight ​

number

options? ​

SSPlacementOptions = {}

Returns ​

SSPlacement