I'd like to say thank you very much to the developers and contributers
of MochiKit!

I believe that the MochiKit.Style module is missing one important
function:

centerElement(obj)

Here is how I have solved it:

function centerElement(obj){
        var vpDim = getViewportDimensions();
        var elemDim = getElementDimensions(obj);
        setElementPosition(obj, {'x':((elemDim.w -
objDim.w)/2),'y':((elemDim.h - objDim.h)/2)});
}

Tested against the latest SVN trunk.

I hope this helps others and/or makes it to svn :D

Regards,

Cameron Maxwell


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"MochiKit" 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/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to