Browse Source

Update README.md: info about custom autoscrolling function

pull/832/head
Boris Sergeev 9 years ago
parent
commit
b11772918e
  1. 9
      README.md

9
README.md

@ -74,6 +74,7 @@ var sortable = new Sortable(el, {
fallbackTolerance: 0 // Specify in pixels how far the mouse should move before it's considered as a drag. fallbackTolerance: 0 // Specify in pixels how far the mouse should move before it's considered as a drag.
scroll: true, // or HTMLElement scroll: true, // or HTMLElement
scrollFn: function(offsetX, offsetY, originalEvent) { ... }, // if you have custom scrollbar scrollFn may be used for autoscrolling
scrollSensitivity: 30, // px, how near the mouse must be to an edge to start scrolling. scrollSensitivity: 30, // px, how near the mouse must be to an edge to start scrolling.
scrollSpeed: 10, // px scrollSpeed: 10, // px
@ -336,6 +337,14 @@ Demo:
--- ---
#### `scrollFn` option
Defines function that will be used for autoscrolling. el.scrollTop/el.scrollLeft is used by default.
Useful when you have custom scrollbar with dedicated scroll function.
---
#### `scrollSensitivity` option #### `scrollSensitivity` option
Defines how near the mouse must be to an edge to start scrolling. Defines how near the mouse must be to an edge to start scrolling.

Loading…
Cancel
Save