element.dragHandle = new Draggable(element, { //bla });

When the element comes into your method, just reference the dragHandle

On Sep 22, 9:45 am, Grego <[EMAIL PROTECTED]> wrote:
> I see you are talking about the onDrop callback of Droppables, which
> is documented athttp://github.com/madrobby/scriptaculous/wikis/droppables
> I was reacting to the documentation 
> athttp://github.com/madrobby/scriptaculous/wikis/draggable
> in which the example shows a new draggable being created followed by
> the following lines...
> // then destroy it when you don't need it anymore
> mydrag.destroy();
> ... which caused me to think that - oh new draggables should be
> cleaned up when we are done with them. Now, for me, if I create an
> object through an API, and cleanup is expected, then I expect the API
> to provide a cleanup method. This way I know internal structures
> within the API are properly updated. If I remove the draggable
> directly from the dom then internal Draggables structures will
> reference an element that no longer exists.
> To me, it looks like the method provided by the API, 'destroy',
> requires information (the draggable handle) which is not conveniently
> available - hence my suggestion for an API cleanup method that can
> work with information that is conveniently available at drop time -
> namely the element.
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to