Skip to content

Releases: ilyashubin/scrollbooster

v3.0.0

07 Jun 20:00
Compare
Choose a tag to compare

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

07 Mar 19:23
Compare
Choose a tag to compare
  • Added pointerDownPreventDefault option to control window scroll on mobile devices
  • Fix click prevention #35

v2.2.2

16 Feb 18:31
Compare
Choose a tag to compare
  • Fix link drag issue (#27)

v2.2.1

15 Feb 11:37
Compare
Choose a tag to compare
  • Change globalObject to this to prevent Node crash (#32)

v2.2.0

01 Feb 19:09
Compare
Choose a tag to compare

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

08 Jan 12:32
Compare
Choose a tag to compare

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

v2.0.0

02 Jan 11:36
Compare
Choose a tag to compare

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