Browse Source

#210: + 'dropBubble: false' & 'dragoverBubble: false' options

issue-210
RubaXa 10 years ago
parent
commit
06aac74871
  1. 11
      Sortable.js

11
Sortable.js

@ -106,7 +106,9 @@
animation: 0, animation: 0,
setData: function (dataTransfer, dragEl) { setData: function (dataTransfer, dragEl) {
dataTransfer.setData('Text', dragEl.textContent); dataTransfer.setData('Text', dragEl.textContent);
} },
dropBubble: false,
dragoverBubble: false
}; };
@ -465,7 +467,7 @@
if (evt.preventDefault !== void 0) { if (evt.preventDefault !== void 0) {
evt.preventDefault(); evt.preventDefault();
evt.stopPropagation(); !options.dragoverBubble && evt.stopPropagation();
} }
if (!_silent && activeGroup && if (!_silent && activeGroup &&
@ -586,7 +588,8 @@
}, },
_onDrop: function (/**Event*/evt) { _onDrop: function (/**Event*/evt) {
var el = this.el; var el = this.el,
options = this.options;
clearInterval(this._loopId); clearInterval(this._loopId);
clearInterval(autoScroll.pid); clearInterval(autoScroll.pid);
@ -601,7 +604,7 @@
if (evt) { if (evt) {
evt.preventDefault(); evt.preventDefault();
evt.stopPropagation(); !options.dropBubble && evt.stopPropagation();
ghostEl && ghostEl.parentNode.removeChild(ghostEl); ghostEl && ghostEl.parentNode.removeChild(ghostEl);

Loading…
Cancel
Save