I had a similar issue.

I'm not sure though the following is the best way to solve it, but does exactly what you describe.

--------------------------------------------------------------------

        var MyStartEndObserver = Class.create();
        MyStartEndObserver.prototype = {
          initialize: function(element) {
            this.element   = $(element);
          },
         
          onStart: function() {
            alert('Let\'s go!');
          },
         
          onEnd: function() {
            alert('I\'m done...');
          }
        }

        Sortable.create("MySortable",
        {dropOnEmpty:true,tag:'div',containment:["MySortable"],constraint:false, ghosting: true});

        Draggables.addObserver(new MyStartEndObserver($('MySortable_element_1')))
        Draggables.addObserver(new MyStartEndObserver($('MySortable_element_2')))
        Draggables.addObserver(new MyStartEndObserver($('MySortable_element_3')))


--------------------------------------------------------------------


Hope it helps.

Cheers,

Vassilis

On 8/14/06, Tim Bellinghausen <[EMAIL PROTECTED]> wrote:
Hi,

Am Freitag, den 11.08.2006, 08:42 -0700 schrieb glui2001:
> What kind of info are you looking for?

I need to know, when the dragging starts and stops, because I have an
onMouseover event bind to the elements of my sortable and having the
onMouseover constantly updating while the item is dragged is an massive
performance drawback, so I want to disable the onMousover action, when
the dragging starts, and to re-enable it, when the dragging has stopped.
So my Problem is that the onChange handler reacts to late (if the order
of the items changed) and the onUpdate is also not the right thing to
get the Information, when the dragging stops, because maybe the order
did not change, so onUpdate will not be called.

I hope this made my problem a little bit clearer and thanks for an
ideas,

Tim

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to