2006年 08月 17日

MochiKit の getElementDimensions

display: none だととれないので以下のように

e.style.position = "absolute";
e.style.visibility = "hidden";
showElement(e);
var dim = getElementDimensions(e);
hideElement(e);
e.style.visibility = "visible";
e.style.position = "static";

blindDown 使うときは beforeStart でこれをやって、this.scaleMode.originalHeight とかに突っ込んであげないとだめっぽい。