getScrollSize
Commons
stable
Returns the scrollWidth or scrollHeight of an element depending on the axis. Returns 0 when the element is undefined. Used by SlideGroup to determine total scrollable content size.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- isHorizontalrequisboolean
- When true, reads scrollWidth; when false, reads scrollHeight.
- elementHTMLElement
- The scroll container element. Returns 0 when omitted.
API
Valeur de retour
La valeur retournée par cet util.
- The full scrollable content size in pixels along the selected axis, or 0 if the element is absent.
Usage
Exemples
Extraits de code prêts à coller.
Compute whether scroll arrows should be shown