]> source.dussan.org Git - jquery-ui.git/commitdiff
draggable: fixed issue with connectToSortable, where the helper property was not...
authorPaul Bakaus <paul.bakaus@googlemail.com>
Fri, 30 May 2008 10:07:49 +0000 (10:07 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Fri, 30 May 2008 10:07:49 +0000 (10:07 +0000)
ui/source/ui.draggable.js

index 7ef5f84e600370b552160b251420152a245c5726..64e2062450bec8eccb9865d4c64d5c7158b013f4 100644 (file)
                                        //Also propagate receive event, since the sortable is actually receiving a element\r
                                        this.instance.element.triggerHandler("sortreceive", [e, $.extend(this.instance.ui(), { sender: inst.element })], this.instance.options["receive"]);\r
 \r
-                                       this.instance.options.helper = "original";\r
+                                       this.instance.options.helper = this.instance.options._helper;\r
                                }\r
                        });\r
                        \r
                                                //by cloning the list group item, appending it to the sortable and using it as inst.currentItem\r
                                                //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)\r
                                                this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true);\r
+                                               this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it\r
                                                this.instance.options.helper = function() { return ui.helper[0]; };\r
                                        \r
                                                e.target = this.instance.currentItem[0];\r
                                                this.instance.cancelHelperRemoval = true;\r
                                                this.instance.options.revert = false; //No revert here\r
                                                this.instance.mouseStop(e, true);\r
-                                               this.instance.options.helper = "original";\r
+                                               this.instance.options.helper = this.instance.options._helper;\r
                                                \r
                                                //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size\r
                                                this.instance.currentItem.remove();\r