diff --git a/Sortable.html b/Sortable.html
index 4ec31b8..bb7bc22 100644
--- a/Sortable.html
+++ b/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);
}
};
diff --git a/Sortable.js b/Sortable.js
index 55e8f2f..52b2d2d 100644
--- a/Sortable.js
+++ b/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);