Skip to content

v2.0.0

Compare
Choose a tag to compare
@ilyashubin ilyashubin released this 02 Jan 11:36

Changes in options

  • remove handle option
  • rename mode option to direction (supported values has changed to horizontal, vertical or all)
  • add inputsFocus option
  • add pointerMode option

Changes in methods

  • add scrollTo method
  • add updateOptions method
  • rename getUpdate method to getState

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