@mocanvas/editor · function

getSelectionRotatedPageBounds

declare function getSelectionRotatedPageBounds(editor: Editor): Box | null

The selection's bounds in the selection's OWN rotated frame.

With one rotated shape selected the axis-aligned box is visibly too big — it is the bounding box of a tilted rectangle — so the selection UI draws this box and then rotates it by getSelectionRotation(). With several shapes selected the rotation is zero and this is the ordinary page bounds.

null when nothing is selected.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.