Skip to content

@fabwcie/free-drawing / utils/export / getExportBox

Function: getExportBox() ​

getExportBox(shapes, layer): Box | null

Defined in: packages/free-drawing/src/utils/export.ts:59

Box of shapes with padding, in coordinates of their layer, null without shapes

Parameters ​

shapes ​

DrawingShape[]

exported shapes (also shapes of groups exported alone)

layer ​

Container

draw layer, coordinates of the box are relative to it

Returns ​

Box | null

box rounded to whole units outwards, null without shapes