Hi,
I just encountered a situation where I want to know the position of the
mouse pointer of an element.
I consider this a pretty basic functionality, but Prototype gives me only:
Event.pointerX(event)
Event.pointerY(event)
So I thought adding:
elementX: function(event) {
return this.pointerX(event)-Element.getX(this.element(event));
},
elementY: function(event) {
return this.pointerY(event)-Element.getY(this.element(event));
},
But wait there is no Element.getX. I found out that obtaining the X/y of an
element is not trivial at all, but even more in this case I expect it to be
handled in a library.
Do I miss something or has anyone a reliable and fast implementation for
Element.getX?
Br
Fabian
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---