generateLayers
Commons
stable
Compute the cumulative layout offset layers for the Origam layout system. Each registered layout item (AppBar, NavigationDrawer, Footer…) contributes its size to the running totals for its side (top/bottom/left/right), producing a cascade of offset objects used by the layout composable.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- layoutrequisArray<string>
- Ordered list of layout item IDs. Items are stacked in this order.
- positionsrequisMap<string, Ref<TDirectionBoth>>
- Map from layout item ID to its anchored side (top | bottom | left | right).
- layoutSizesrequisMap<string, Ref<number | string>>
- Map from layout item ID to its rendered size on its anchor axis (pixels or CSS length).
- activeItemsrequisMap<string, Ref<boolean>>
- Map from layout item ID to its visibility state. Inactive items contribute 0 to the offset.
API
Valeur de retour
La valeur retournée par cet util.
- Ordered array of layer snapshots. Each entry holds the ID and the cumulative ILayer offsets at that point in the stack.
Usage
Exemples
Extraits de code prêts à coller.
Compute layout offsets for AppBar + Footer