[Proto-Scripty] Re: is there a way for Droppable to reject Dragable?

2008-10-01 Thread Jo Rhett
On Oct 1, 2008, at 2:38 PM, Christophe Porteneuve wrote: > Look into Droppable's callbacks. One of them lets you dynamically say > whether you accept dropping or not, I believe. I don't see such a thing. That's exactly what I was asking about. -- Jo Rhett Net Consonance : consonant endings

[Proto-Scripty] Re: is there a way for Droppable to reject Dragable?

2008-10-01 Thread Jo Rhett
On Oct 1, 2008, at 12:27 PM, Diodeus wrote: > I'm not 100% clear on what you're describing, but this is how i do it: > > Droppables.add('myDrop', > {accept:'someDraggable',onDrop:function(dragName,dropName) > {registerDrop(dragName,dropName)}}) care to share registerDrop() ? ;-) -- Jo Rhett N

[Proto-Scripty] Re: is there a way for Droppable to reject Dragable?

2008-10-01 Thread Christophe Porteneuve
Diodeus a écrit : > I'm not 100% clear on what you're describing, but this is how i do it: > > Droppables.add('myDrop', > {accept:'someDraggable',onDrop:function(dragName,dropName) > {registerDrop(dragName,dropName)}}) Don't you feel the huge code smell of this?! -- Christophe Porteneuve aka T

[Proto-Scripty] Re: is there a way for Droppable to reject Dragable?

2008-10-01 Thread Christophe Porteneuve
Look into Droppable's callbacks. One of them lets you dynamically say whether you accept dropping or not, I believe. -- Christophe Porteneuve aka TDD [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

[Proto-Scripty] Re: is there a way for Droppable to reject Dragable?

2008-10-01 Thread Diodeus
I'm not 100% clear on what you're describing, but this is how i do it: Droppables.add('myDrop', {accept:'someDraggable',onDrop:function(dragName,dropName) {registerDrop(dragName,dropName)}}) On Oct 1, 2:47 pm, Jo Rhett <[EMAIL PROTECTED]> wrote: > I was thinking that, but I don't see how to know

[Proto-Scripty] Re: is there a way for Droppable to reject Dragable?

2008-10-01 Thread Diodeus
You will need to remove the droppable for the element once the first item is dropped on it. You car re-create the droppable later if you want to enable that emelemt again. Droppables.remove(element); http://github.com/madrobby/scriptaculous/wikis/droppables On Oct 1, 1:26 pm, Jo Rhett <[EMAIL

[Proto-Scripty] Re: is there a way for Droppable to reject Dragable?

2008-10-01 Thread Jo Rhett
I was thinking that, but I don't see how to know when the Draggable leaves it. Would storing a reference to the droppable in the draggable be sufficient for this? Use the onDropped function to re-add the previous Dropabble? I've noticed that onDropped doesn't appear to be documented (bu