flipCorner

Commons
stable

Return a new parsed anchor where side and align are swapped (the anchor "rotates" 90°). Used by the overlay engine to compute diagonal collision-avoidance fallbacks.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

anchor
required
TParsedAnchor
The parsed anchor object whose side and align values will be transposed.

API

Return value

The value returned by this util.

A new TParsedAnchor with side and align swapped.

Usage

Examples

Ready-to-paste usage snippets.

Transpose side and align

typescript