changes submitted by Dan Haddix (dan6992@hotmail.com); bug #37788

git-svn-id: svn://10.0.0.236/trunk@75321 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brade%netscape.com
2000-08-01 14:31:26 +00:00
parent 197df3eb6d
commit a92780d770
2 changed files with 39 additions and 8 deletions

View File

@@ -744,18 +744,19 @@ function zoom(direction, ratio){
}
imgEl = frameDoc.getElementById("mainImg");
bgDiv = frameDoc.getElementById("bgDiv");
dump(imgEl.getAttribute("width")+'\n');
if (ratio > currentZoom){
imgEl.setAttribute("width", (parseInt(imgEl.offsetWidth)*(ratio/currentZoom)));
imgEl.setAttribute("height", (parseInt(imgEl.offsetHeight)*(ratio/currentZoom)));
frameDoc.getElementById("bgDiv").style.width = imgEl.getAttribute("width");
frameDoc.getElementById("bgDiv").style.height = imgEl.getAttribute("height");
//imgEl.setAttribute("height", (parseInt(imgEl.offsetHeight)*(ratio/currentZoom));
bgDiv.style.width = imgEl.offsetWidth;
bgDiv.style.height = imgEl.offsetHeight;
}
else{
imgEl.setAttribute("width", (parseInt(imgEl.offsetWidth)/(currentZoom/ratio)));
imgEl.setAttribute("height", (parseInt(imgEl.offsetHeight)/(currentZoom/ratio)));
frameDoc.getElementById("bgDiv").style.width = imgEl.getAttribute("width");
frameDoc.getElementById("bgDiv").style.height = imgEl.getAttribute("height");
//imgEl.setAttribute("height", (parseInt(imgEl.offsetHeight)/(currentZoom/ratio)));
bgDiv.style.width = imgEl.offsetWidth;
bgDiv.style.height = imgEl.offsetHeight;
}
currentZoom = ratio;
}