|
|
|
@ -249,6 +249,7 @@
|
|
|
|
|
dragClass: 'sortable-drag', |
|
|
|
|
ignore: 'a, img', |
|
|
|
|
filter: null, |
|
|
|
|
preventOnFilter: true, |
|
|
|
|
animation: 0, |
|
|
|
|
setData: function (dataTransfer, dragEl) { |
|
|
|
|
dataTransfer.setData('Text', dragEl.textContent); |
|
|
|
@ -306,6 +307,7 @@
|
|
|
|
|
var _this = this, |
|
|
|
|
el = this.el, |
|
|
|
|
options = this.options, |
|
|
|
|
preventOnFilter = preventOnFilter.options, |
|
|
|
|
type = evt.type, |
|
|
|
|
touch = evt.touches && evt.touches[0], |
|
|
|
|
target = (touch || evt).target, |
|
|
|
@ -339,7 +341,7 @@
|
|
|
|
|
if (typeof filter === 'function') { |
|
|
|
|
if (filter.call(this, evt, target, this)) { |
|
|
|
|
_dispatchEvent(_this, originalTarget, 'filter', target, el, startIndex); |
|
|
|
|
evt.preventDefault(); |
|
|
|
|
preventOnFilter && evt.preventDefault(); |
|
|
|
|
return; // cancel dnd
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -354,7 +356,7 @@
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if (filter) { |
|
|
|
|
evt.preventDefault(); |
|
|
|
|
preventOnFilter && evt.preventDefault(); |
|
|
|
|
return; // cancel dnd
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|