From 7370f0a8cf92668ffe7d065481eb58607e141ffa Mon Sep 17 00:00:00 2001 From: shimizu daisuke Date: Wed, 25 Nov 2015 12:09:57 +0900 Subject: [PATCH] Modified to initialize variables in _onDrop. so destory function does not work well. --- Sortable.js | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/Sortable.js b/Sortable.js index f8ceed0..75365d7 100644 --- a/Sortable.js +++ b/Sortable.js @@ -808,31 +808,34 @@ } } - // Nulling - rootEl = - dragEl = - parentEl = - ghostEl = - nextEl = - cloneEl = + } + this._nulling(); + }, - scrollEl = - scrollParentEl = + _nulling: function() { + // Nulling + rootEl = + dragEl = + parentEl = + ghostEl = + nextEl = + cloneEl = - tapEvt = - touchEvt = + scrollEl = + scrollParentEl = - moved = - newIndex = + tapEvt = + touchEvt = - lastEl = - lastCSS = + moved = + newIndex = - activeGroup = - Sortable.active = null; - } - }, + lastEl = + lastCSS = + activeGroup = + Sortable.active = null; + }, handleEvent: function (/**Event*/evt) { var type = evt.type;