Browse Source

#1236: Creating clone if it really needs

pull/1242/head
RubaXa 7 years ago
parent
commit
495b9deb86
  1. 9
      Sortable.js
  2. 2
      Sortable.min.js

9
Sortable.js

@ -91,6 +91,8 @@
savedInputChecked = [], savedInputChecked = [],
touchDragOverListeners = [], touchDragOverListeners = [],
alwaysFalse = function () { return false },
_autoScroll = _throttle(function (/**Event*/evt, /**Object*/options, /**HTMLElement*/rootEl) { _autoScroll = _throttle(function (/**Event*/evt, /**Object*/options, /**HTMLElement*/rootEl) {
// Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521 // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
if (rootEl && options.scroll) { if (rootEl && options.scroll) {
@ -180,8 +182,11 @@
_prepareGroup = function (options) { _prepareGroup = function (options) {
function toFn(value, pull) { function toFn(value, pull) {
if (value === void 0 || value === true) { if (value == null || value === true) {
value = group.name; value = group.name;
if (value == null) {
return alwaysFalse;
}
} }
if (typeof value === 'function') { if (typeof value === 'function') {
@ -250,7 +255,7 @@
// Default options // Default options
var defaults = { var defaults = {
group: Math.random(), group: null,
sort: true, sort: true,
disabled: false, disabled: false,
store: null, store: null,

2
Sortable.min.js vendored

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