Displaying 1 result from an estimated 1 matches for "offleft".
Did you mean:
offbeat
2006 Feb 03
0
Contribute: Center extension to Prototype''s Position object
...ent.getDimensions(element);
Position.prepare();
var winWidth = self.innerWidth ||
document.documentElement.clientWidth || document.body.clientWidth || 0;
var winHeight = self.innerHeight ||
document.documentElement.clientHeight || document.body.clientHeight || 0;
var offLeft = (Position.deltaX + Math.floor((winWidth-dims.width
)/2));
var offTop = (Position.deltaY + Math.floor((winHeight-dims.height
)/2));
element.style.top = ((offTop != null && offTop > 0) ? offTop : ''0'')
+ ''px'';
element.style.left...