I have a draggable with a custom helper. Sometimes the helper is a clone and sometimes it is the original element. The problem is that when the helper is the original element and is not dropped on a valid droppable it gets removed. My solution looks like this so far:
in my on_dropped
callback I set ui.helper.dropped_on_droppable
to true
;
In the stop
callback of the draggable, I check for that variable and then ... what do I do?
$('.my_draggable').draggable({
stop : function(e, ui) {
if (!ui.helper.dropped_on_droppable) {
/* what do I do here? */
}
},
Is this even the right approach?