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

Definition

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

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

contentEl
required
Ref<HTMLElement | undefined>
Reactive reference to the floating content element. The strategy reads its dimensions and writes its position here.
target
required
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
required
Ref<boolean>
Reactive flag that reflects whether the floating content is currently visible. Strategies may skip recalculation when false.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Implementing a custom location strategy

typescript