Right, my bad.  Glad you got it working.

Now I'm tempted to add .distanceFrom(anotherElement) as an element
extension. :-)

-Fred

On Fri, May 30, 2008 at 7:37 AM, Wyerarch <[EMAIL PROTECTED]> wrote:

>
> Frederick,
>
> Thanks for the reply!
>
> After switching the target and element offsets around it worked!
>
> Thanks for your help!
>
> James.
>
>
> On May 29, 4:26 pm, "Frederick Polgardy" <[EMAIL PROTECTED]> wrote:
> > Off the top of my head, inside of your onDrop handler, call
> > .positionedOffset() on the element and the drop container and see how
> much
> > they differ:
> >
> > Droppables.add(target, {
> >   onDrop: function(element) {
> >     var elementOffset = element.positionedOffset();
> >     var targetOffset = target.positionedOffset();
> >     var diffX = targetOffset.left - elementOffset.left;
> >     var diffY = targetOffset.top - elementOffset.top;
> >     ....
> >   }
> >
> >
> >
> >
> >
> > });
>

-- 
Science answers questions; philosophy questions answers.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to