Releases: ilyashubin/scrollbooster
v3.0.0
Added props:
lockScrollOnDragDirection
, preventDefaultOnEmulateScroll
, dragDirectionTolerance
, onPointerDown
, onPointerUp
, onPointerMove
, onWheel
Handler methods now receives third parameter isTouch
to detect whether it is called on touch device or desktop.
Removed prop and breaking changes:
pointerDownPreventDefault
. Use lockScrollOnDragDirection: 'all'
as a replacement, but by default this behavior is now disabled (this means on touch devices all viewport will scroll along scrollable area, use prop lockScrollOnDragDirection
to change this behavior for your needs)
Fixed click event on mobile devices
Thanks to @alexwidua and @bragovo for contributions:
#47 Lock scroll when dragged horizontally/vertically
#46 Add onWheel callback for swap axes
v2.3.0
v2.2.2
v2.2.1
v2.2.0
Release to simplify basic library usage. Prepare to React release
- Added
scrollMode
option to perform CSS or native scrolling by library itself, no more need to passonUpdate
and handle scroll logic manually. It is optional though - Disable right click dragging by default
- Fix
updateOptions
method - now it can update all supported options - Added some comments and jsdoc
v2.1.0
Added new state property borderCollision
to check which boundaries positions are reached while scrolling
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