Browse Source

Add 'keepOriginalScroll' as option

pull/1266/head
Noel Heesen 7 years ago
parent
commit
e518620ec2
  1. 8
      Sortable.js
  2. 2
      Sortable.min.js

8
Sortable.js

@ -167,7 +167,10 @@
scrollOffsetX = vx ? vx * speed : 0;
if ('function' === typeof(scrollCustomFn)) {
return scrollCustomFn.call(_this, scrollOffsetX, scrollOffsetY, evt, touchEvt, el);
var scrollFnResult = scrollCustomFn.call(_this, scrollOffsetX, scrollOffsetY, evt, touchEvt, el);
if (!options.keepOriginalScroll) {
return scrollFnResult;
}
}
if (el === win) {
@ -262,7 +265,8 @@
disabled: false,
store: null,
handle: null,
scroll: true,
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