Scroll
You're browsing the documentation for v3
Scroll
Overview
The Scroll component scrolls the slider to the arbitrary position without the Transition component. This component moves the slider by requestAnimationFrame
. The Drag component uses this in the drag free mode.
Methods
scroll()
scroll( position: number, duration?: number ): void
Scrolls the slider to the provided destination.
This method does not update active and previous indices,
but Controller#scroll()
does.
Params
destination | The destination to scroll to. |
---|---|
duration | Optional. The scroll duration. If omitted, calculates it by the distance and the base velocity. |
cancel()
cancel(): void
Cancels scrolling and emits the scrolled
event.