ILayoutProvide

interface
Layout & Sizing

Internal provide/inject contract exposed by OrigamLayout to its registered layout items — do not use directly in application code.

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.

register
requis
( vm: ComponentInternalInstance, options: { id: string order: Ref<number> position: Ref<TDirectionBoth> layoutSize: Ref<number | string> elementSize: Ref<number | string | undefined> active: Ref<boolean> disableTransitions?: Ref<boolean> absolute: Ref<boolean | undefined> } ) => { layoutItemStyles: Ref<CSSProperties> layoutItemScrimStyles: Ref<CSSProperties> zIndex: Ref<number> }
Called by useLayoutItem to register a new docked item and receive reactive style refs.
unregister
requis
(id: string) => void
Removes a previously registered item from the layout.
mainRect
requis
Ref<ILayer>
Reactive bounding-box of the main content area after all items have claimed their space.
mainStyles
requis
Ref<CSSProperties>
Computed CSS properties applied to the main content slot (padding offsets derived from registered items).
getLayoutItem
requis
(id: string) => ILayerItem | undefined
Retrieves the ILayerItem record for the given item id.
items
requis
Ref<Array<ILayerItem>>
Reactive list of all currently registered layout items.
layoutRect
requis
Ref<DOMRectReadOnly | undefined>
DOMRect of the layout root element, updated by a ResizeObserver.
rootZIndex
requis
Ref<number>
Base z-index from which layout item z-indices are calculated.
layoutId
requis
ComputedRef<string>
Unique id of the layout instance, used to scope CSS properties.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Injecting the layout context in a custom layout item

typescript