www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4c2f7ac7c94489c3fb7bd734cc166ed2a9b19b42
parent 26775b952000e9edaf44786b77148b195b7c324e
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Thu, 10 Apr 2014 20:10:28 -0400

Handle resizing better (it flickered when shrinking windows), and take original size into account when changing visibility.

Diffstat:
Munpacked/extensions/MathZoom.js | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/unpacked/extensions/MathZoom.js b/unpacked/extensions/MathZoom.js @@ -189,7 +189,7 @@ if (zoom.offsetWidth > Mw) {zoom.style.width = Mw+"px"; zoom.style.height = (bbox.zH+this.scrollSize)+"px"} } if (this.operaPositionBug) {zoom.style.width = Math.min(Mw,bbox.zW)+"px"} // Opera gets width as 0? - if (zoom.offsetWidth > eW && zoom.offsetWidth < Mw && zoom.offsetHeight < Mh) + if (zoom.offsetWidth > eW && zoom.offsetWidth-eW < Mw && zoom.offsetHeight-eW < Mh) {zoom.style.overflow = "visible"} // don't show scroll bars if we don't need to this.Position(zoom,bbox); if (this.msieTrapEventBug) { @@ -225,7 +225,7 @@ var XY = this.Resize(), x = XY.x, y = XY.y, W = bbox.mW; var dx = -W-Math.floor((zoom.offsetWidth-W)/2), dy = bbox.Y; zoom.style.left = Math.max(dx,10-x)+"px"; zoom.style.top = Math.max(dy,10-y)+"px"; - this.Resize(); // refigure overlay position and size + setTimeout(ZOOM.Resize); // refigure overlay position and size }, // @@ -244,7 +244,7 @@ xy.x -= XY.x; xy.y -= XY.y; } overlay.style.left = (-xy.x)+"px"; overlay.style.top = (-xy.y)+"px"; - setTimeout(ZOOM.SetWH,0); + if (ZOOM.msiePositionBug) {setTimeout(ZOOM.SetWH,0)} else {ZOOM.SetWH()} return xy; }, SetWH: function () {