SanderElias a écrit :

Hi Thomas,
Tanks for the quick reply

You're welcome.

> >   1. on a successful drop, the draggable does a revert. I only want a
> > revert, when it's dropped outside an dropzone.
>
> To do this, just remove the element in your ondrop function.
but I'm moving it to a new parent, would that not remove that too? Or
do I have it backwards, and to I have to set the new parent/owner by
hand?

OK forget what I said. You'll have to do something trickier. I see two
options:

* personalize the reverteffect option to do the revert only when you
want
* the other is not documented: you can pass a function to revert, that
takes the element as argument and returns whether it should be reverted
or not. Hint: to make this work, connect to the end signal on
Draggables, and change the class of your element. Then in your revert
function check the value of your element class.

> >   2. Somehow connecting to the draggable fails.
> The signals generated are generated on the Draggables
> (MochiKit.DragAndDrop.Draggables). You connect to it *one* time for all
> your draggable items. You'll get the draggable as first argument.
this did the trick! :)

Great :). Don't hesitate to say if the documentation is not clear on
that part.

--
Thomas


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to