Browse Source

Remove keepOriginalScroll option

pull/1266/head
Noel Heesen 7 years ago
parent
commit
07da2fc4b0
  1. 3
      README.md
  2. 8
      Sortable.js
  3. 2
      Sortable.min.js

3
README.md

@ -100,8 +100,7 @@ var sortable = new Sortable(el, {
fallbackOnBody: false, // Appends the cloned DOM Element into the Document's Body
fallbackTolerance: 0, // Specify in pixels how far the mouse should move before it's considered as a drag.
scroll: true, // or HTMLElement
keepOriginalScroll: false // use only with scrollFn. Also keep the original scroll behavior alongside the scrollFn
scroll: true, // or HTMLElement
scrollFn: function(offsetX, offsetY, originalEvent, touchEvt, hoverTargetEl) { ... }, // 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.
scrollSpeed: 10, // px

8
Sortable.js

@ -167,10 +167,9 @@
scrollOffsetX = vx ? vx * speed : 0;
if ('function' === typeof(scrollCustomFn)) {
var scrollFnResult = scrollCustomFn.call(_this, scrollOffsetX, scrollOffsetY, evt, touchEvt, el);
if (!options.keepOriginalScroll) {
return scrollFnResult;
}
if (scrollCustomFn.call(_this, scrollOffsetX, scrollOffsetY, evt, touchEvt, el) !== 'continue') {
return;
}
}
if (el === win) {
@ -266,7 +265,6 @@
store: null,
handle: null,
scroll: true,
keepOriginalScroll: false,
scrollSensitivity: 30,
scrollSpeed: 10,
draggable: /[uo]l/i.test(el.nodeName) ? 'li' : '>*',

2
Sortable.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save