From 3b09c17bc799cf72af82038d136e7427bf84a043 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Tue, 30 Dec 2008 16:34:23 +0000 Subject: [PATCH] draggable: made connectToSortable work fine with helper: 'original' (by removing top/left properties at sort end) --- ui/ui.draggable.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js index fc25ab3fd..a18546001 100644 --- a/ui/ui.draggable.js +++ b/ui/ui.draggable.js @@ -428,6 +428,11 @@ $.ui.plugin.add("draggable", "connectToSortable", { this.instance.element.triggerHandler("sortreceive", [event, $.extend(this.instance._ui(), { sender: inst.element })], this.instance.options["receive"]); this.instance.options.helper = this.instance.options._helper; + + if(inst.options.helper == 'original') { + this.instance.currentItem.css({ top: 'auto', left: 'auto' }); + } + } else { this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance this.instance._propagate("deactivate", event, inst);