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

Définition

La définition TypeScript telle qu'elle apparaît dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Entrées

Valeurs

Toutes les entrées de cette constante. Cliquez sur une valeur pour la copier dans le presse-papiers.

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.

Écosystème

Utilisé par

Composables et composants qui consomment cette constante.

  • OrigamMenu

  • OrigamTooltip

Usage

Exemples

Extraits de code prêts à coller utilisant cette constante.

Flipping a placement when out of bounds

typescript