Browse Source

Fix feedback

pull/839/head
Tim van der Lippe 9 years ago
parent
commit
238216d8c9
  1. 22
      Sortable.html
  2. 5
      Sortable.js

22
Sortable.html

@ -64,13 +64,13 @@
options[key] = this[key];
}.bind(this));
var self = this;
var _this = this;
var eventCallbacks = {
onUpdate: function (e) {
if (template) {
template.splice("items", e.newIndex, 0, template.splice("items", e.oldIndex, 1)[0]);
}
self.fire("update", e);
_this.fire("update", e);
},
onAdd: function(e) {
@ -80,42 +80,42 @@
var item = from.items[e.oldIndex];
template.splice("items", e.newIndex, 0, item);
}
self.fire("add", e);
_this.fire("add", e);
},
onRemove: function(e) {
if (template) {
template.splice("items", e.oldIndex, 1)[0];
}
self.fire("remove", e);
_this.fire("remove", e);
},
onChoose: function(e) {
self.fire("choose", e);
_this.fire("choose", e);
},
onStart: function(e) {
self.fire("start", e);
_this.fire("start", e);
},
onEnd: function(e) {
self.fire("end", e);
_this.fire("end", e);
},
onSort: function(e) {
self.fire("sort", e);
_this.fire("sort", e);
},
onFilter: function(e) {
self.fire("filter", e);
_this.fire("filter", e);
},
onMove: function(e) {
self.fire("move", e);
_this.fire("move", e);
},
onClone: function(e) {
self.fire("clone", e);
_this.fire("clone", e);
}
};

5
Sortable.js

@ -744,9 +744,8 @@
target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
}
}
if (dragEl) {
parentEl = dragEl.parentNode; // actualization
}
parentEl = dragEl.parentNode; // actualization
this._animate(dragRect, dragEl);
this._animate(targetRect, target);

Loading…
Cancel
Save