union
The smallest rectangle that contains all the given rectangles, e.g. the bounds of a group of layers.
Available since v3.1.5
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
rects | readonly Rect[] | The rectangles |
Returns
Section titled “Returns”Rect | undefined — Their bounding rectangle, or undefined for none
Examples
Section titled “Examples”Bounds of a group
Section titled “Bounds of a group”The smallest rectangle containing every layer.
Empty group
Section titled “Empty group”No rectangle, no bounds.
Related Types
Section titled “Related Types”An axis-aligned rectangle: its top-left corner and its size. Width and height are expected to be non-negative.
