"objDim is not defined"
I believe you might have meant: vpDim.w - elemDim.w
which would make it:
function centerElement(obj){
var vpDim = getViewportDimensions();
var elemDim = getElementDimensions(obj);
setElementPosition(obj, {'x':((vpDim.w -
elemDim.w)/2),'y':((vpDim.h - elemDim.h)/2)});
}
Cheers,
Matt
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---