OPPOSITE_MAP

const
Layout & Sizing

Lookup table that maps each TLocation value to its geometric opposite. Used by the connected location strategy to flip a floating element when there is not enough space on the preferred side.

TypeScript

Definition

The TypeScript definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Entries

Values

All entries in this constant. Click a value to copy it to clipboard.

center: 'center'
center stays center (no geometric opposite).
top: 'bottom'
Opposite of top is bottom.
bottom: 'top'
Opposite of bottom is top.
left: 'right'
Opposite of left is right.
right: 'left'
Opposite of right is left.
start: 'right'
start (logical) maps to the physical right in the default LTR direction.
end: 'left'
end (logical) maps to the physical left in the default LTR direction.

Ecosystem

Used by

Composables and components that consume this constant.

  • OrigamMenu

  • OrigamTooltip

Usage

Examples

Ready-to-paste code snippets using this constant.

Flipping a placement when out of bounds

typescript