Hey,
While I don't have the time to contribute, something on my list id like
to contribute in the future (or probe some of the smarties on this list
to do) is a full positioning system. I'd love to be able to write:
centerElement(e); (to center on the user's screen)
getPositionX()
getPositionY()
setPosition(e, x, y);
setElementWidth(e);
setElementHeight(e);
elementFromTop(e, px) (to set the element x pixels form the top);
elementFromLeft(e, px)
elementFromRight(e, px)
elementFromBottom(e, px)
Ryan Nichols
Apples To Oranges
http://www.apples-to-oranges.com
Bob Ippolito wrote:
On Nov 18, 2005, at 1:03 PM, Leonardo Soto M. wrote:
I've been using MochiKit for two weeks, and I'm pretty happy with
it. Happy enough that I'm now porting a small javascript widget
library used in my work to be based on MochiKit :-).
Now, my question. What about including in Mochikit some functions to
get the coordinates of a element relative to the document?. I mean,
something like <http://www.quirksmode.org/js/findpos.html> (this is
what I'm using now). Or is it a way to do it already present in
MochiKit.DOM?
I'll go ahead and add something to svn for 1.2, although it seems
like it might be a little quirky depending on what the style.position
is set to and it could be fairly hard to create proper automated
tests for..
http://mochikit.com/doc/html/MochiKit/DOM.html#fn-elementposition
-bob