ILocationStrategyData

interface
Layout & Sizing

Runtime data bag passed to a location strategy function — gives access to the floating content element, the anchor target and the active state so the strategy can compute and apply the correct position.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

contentEl
requis
Ref<HTMLElement | undefined>
Reactive reference to the floating content element. The strategy reads its dimensions and writes its position here.
target
requis
Ref<HTMLElement | [x: number, y: number] | undefined>
Reactive reference to the anchor element or an [x, y] pixel coordinate. When set to coordinates, the floating panel anchors to a virtual point (used by context menus).
isActive
requis
Ref<boolean>
Reactive flag that reflects whether the floating content is currently visible. Strategies may skip recalculation when false.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Implementing a custom location strategy

typescript