The way I did this was to store a custom attribute against each droppable that was updated onDrop (ie from an event handler) This contained the ID of the 'last known valid location'. Then, onDrop, I performed my validity checks (in my case it was a calendar so I was making sure the appointment didnt overlap with any others) and if it was invalid, I got the current position from the object and found the 'last known valid location' position, calculated the move distances (x&y) and then called an adapted version of the code from the revert function from inside dragdrop.js.
Good luck Gareth On 8/16/07, Dave Stewart <[EMAIL PROTECTED]> wrote: > > > Hi Tom, > > > Look on the bright side: it's a wiki! =) > > Once you do figure it out, make sure to add it. > > Of course, anything I discover I will attempt to add. However, I find > the wiki a confusing and badly-formatted place. Arg. > > Just downloaded Christophe's book ... hopefully that will give me some > more info! > > Cheers, > Dave > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
