Skip to content

overlayRect

overlayRect(locator, options?): Promise<OverlayRect>

Defined in: overlayRect.ts:80

Captures a locator’s bounding box in CSS pixels of the recording viewport, so it can position an overlay over the element (and feed the element’s geometry into a programmatic overlay’s props). boundingBox() is already in CSS px, so the box is used directly after applying any margin and clamping to the viewport. relativeTo is recorded on the result for spreading into a config; 'screen' is only meaningful when the recording fills the output frame.

Locator

OverlayRectOptions = {}

Promise<OverlayRect>