getAxis
Commons
stable
Return the scroll/layout axis ('x' or 'y') for a parsed anchor object. Block-flow sides (top, bottom) map to the Y axis; inline sides (left, right) map to the X axis.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- anchorrequisTParsedAnchor
- Parsed anchor object with a 'side' property. Block sides (top/bottom) → 'y'; inline sides (left/right) → 'x'.
API
Valeur de retour
La valeur retournée par cet util.
- The logical axis string: 'y' for vertical (top/bottom), 'x' for horizontal (left/right).
Usage
Exemples
Extraits de code prêts à coller.
Determine axis from anchor