[Dojo-checkins] bill - r3653 - trunk/src
dojo-checkins-admin at dojotoolkit.org
dojo-checkins-admin at dojotoolkit.org
Mon Apr 24 00:11:18 MDT 2006
Author: bill
Date: Mon Apr 24 00:11:18 2006
New Revision: 3653
Modified:
trunk/src/style.js
Log:
Implement getAbsolutePosition() using mozilla's getBoxObjectFor().
See http://www.siteexperts.com/forums/viewConverse.asp?d_id=15747&start=1
This will also work around a mozilla bug where offsetLeft/offsetTop aren't
set for the <body> element, even though there is implicit margin around
<body>.
Modified: trunk/src/style.js
==============================================================================
--- trunk/src/style.js (original)
+++ trunk/src/style.js Mon Apr 24 00:11:18 2006
@@ -283,7 +283,9 @@
ret.x = left-2+sl;
ret.y = top-2+st;
}
- // FIXME: should we be using getBoxObjectFor() on Moz/FF?
+ }else if(document.getBoxObjectFor){
+ // mozilla
+ ret = document.getBoxObjectFor(node);
}else{
if(node["offsetParent"]){
var endNode;
@@ -319,10 +321,8 @@
ret.y += isNaN(node.y) ? 0 : node.y;
}
}
+
// account for document scrolling!
- // FIXME: why in the hell do we have calls to dojo.html.* when we don't
- // require() it? Does that imply that this method should be in
- // dojo.html instead?
if(includeScroll){
ret.y += st;
ret.x += sl;
More information about the Dojo-checkins
mailing list