Browse Source

Add 'keepOriginalScroll' as option

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

6
Sortable.js

@ -167,7 +167,10 @@
scrollOffsetX = vx ? vx * speed : 0; scrollOffsetX = vx ? vx * speed : 0;
if ('function' === typeof(scrollCustomFn)) { 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) { if (el === win) {
@ -263,6 +266,7 @@
store: null, store: null,
handle: null, handle: null,
scroll: true, scroll: true,
keepOriginalScroll: false,
scrollSensitivity: 30, scrollSensitivity: 30,
scrollSpeed: 10, scrollSpeed: 10,
draggable: /[uo]l/i.test(el.nodeName) ? 'li' : '>*', 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