getScrollPosition
Commons
stable
Returns the current scroll position (scrollLeft or scrollTop) of a SlideGroup element, with RTL correction applied for horizontal axes.
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, returns the horizontal scroll position (scrollLeft); when false, returns scrollTop.
- isRtlrequisboolean
- When true and horizontal, normalises the RTL scrollLeft value so that 0 always means "scrolled to the start of content".
- elementHTMLElement
- The scroll container element. Returns 0 when omitted.
API
Valeur de retour
La valeur retournée par cet util.
- The normalised scroll offset in pixels. Always 0 when element is absent.
Usage
Exemples
Extraits de code prêts à coller.
Read current scroll offset in a slide group