added code to connectToSortable
Hello,
I've added 1 line of code to the new plugin of connectToSortable.
//Now we fake the start of dragging for the sortable instance,
//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.currentItem.html($(ui.helper).html()); //My add
this.instance.options.helper = function() { return ui.helper[0]; };
So I added:
this.instance.currentItem.html($(ui.helper).html()); //My add
I did this because I show and hide some content in the helper that
makes the helper larger in size. When I add this line of code then the
placeholer in the sortable gets the right size. Otherwise its to small
and not logic.
I don't know if other people want to use it or if its handy. But if so
maybe this can be included or be triggerd by a config option. It's
just a suggestion but in my case it's a nice addon.
All the best,
Karel-Jan