That would be a very nice and useful addition indeed! :-)
On May 30, 3:04 pm, "Frederick Polgardy" <[EMAIL PROTECTED]> wrote:
> 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.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-spinoffs@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---