v2.0.0
Changes in options
- remove
handle
option - rename
mode
option todirection
(supported values has changed tohorizontal
,vertical
orall
) - add
inputsFocus
option - add
pointerMode
option
Changes in methods
- add
scrollTo
method - add
updateOptions
method - rename
getUpdate
method togetState
State param rework
State object is passed to onUpdate
, onClick
and shouldScroll
options as first param. Old state param has props isRunning
, isDragging
, isScrolling
, position
, dragOffsetPosition
, viewport
and content
.
Some of these props were misleading and caused confusion. New state param only contains isMoving
, isDragging
, position
and dragOffset
properties.
Images load handling
ScrollBooster now listens images load
event in scrollable content and updates its metrics automatically, so no need to call updateMetrics
manually