Skip to main content

Module overlay

Module overlay 

Source
Expand description

The OVERLAY placement rule every renderer keeps (src/overlay.ts in the TS package; fixtures/overlay-geometry.json locks it): an anchor box, the overlay’s size, the viewport and a preferred side → where it lands. OVERLAY_OFFSET px from the anchor on the preferred side, centred on the cross axis; FLIP when the preferred side has less room than needed and the opposite has more; then SHIFT on the cross axis to stay OVERLAY_PADDING inside the viewport.

Structs§

OverlayPlacement
PlaceOptions
Rect
Size

Enums§

OverlayAlign
OverlaySide

Constants§

OVERLAY_OFFSET
OVERLAY_PADDING

Functions§

place_overlay
Mirrors placeOverlay exactly (the TS rounds to 3 decimals).