Scrollbooster Versions Save

Enjoyable content drag-to-scroll library

v3.0.0

3 years ago

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: https://github.com/ilyashubin/scrollbooster/pull/47 Lock scroll when dragged horizontally/vertically https://github.com/ilyashubin/scrollbooster/pull/46 Add onWheel callback for swap axes

v2.3.0

4 years ago

v2.2.2

4 years ago

v2.2.1

4 years ago

v2.2.0

4 years ago

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 pass onUpdate 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

4 years ago

Added new state property borderCollision to check which boundaries positions are reached while scrolling

v2.0.0

4 years ago

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