Skip to content
Browse files

draggable: fixed issue with connectToSortable, where the helper prope…

…rty was not properly restored later on
  • Loading branch information
Paul Bakaus
Paul Bakaus committed May 30, 2008
1 parent 3c2a4f5 commit 5b19d8e7236710a94e458e1e1b1e84b488f72ab0
Showing with 3 additions and 2 deletions.
  1. +3 −2 ui/source/ui.draggable.js
@@ -460,7 +460,7 @@
//Also propagate receive event, since the sortable is actually receiving a element
this.instance.element.triggerHandler("sortreceive", [e, $.extend(this.instance.ui(), { sender: inst.element })], this.instance.options["receive"]);

this.instance.options.helper = "original";
this.instance.options.helper = this.instance.options._helper;

@@ -492,6 +492,7 @@
//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true);
this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
this.instance.options.helper = function() { return ui.helper[0]; }; = this.instance.currentItem[0];
@@ -519,7 +520,7 @@
this.instance.cancelHelperRemoval = true;
this.instance.options.revert = false; //No revert here
this.instance.mouseStop(e, true);
this.instance.options.helper = "original";
this.instance.options.helper = this.instance.options._helper;

//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size

0 comments on commit 5b19d8e

Please sign in to comment.
You can’t perform that action at this time.