rem: imgEl.setAttribute("height", (parseInt(imgEl.offsetHeight)*(ratio/currentZoom))); frameDoc.getElementById("bgDiv").style.width = imgEl.getAttribute("width"); frameDoc.getElementById("bgDiv").style.height = imgEl.getAttribute("height"); 
add:  bgDiv.style.width = imgEl.offsetWidth; bgDiv.style.height = imgEl.offsetHeight; 
context: function zoom(direction, ratio){  dump('zoom called; ratio='+ratio+'\n');  if (direction == "in")    ratio = currentZoom*2;  else if (direction == "out")    ratio = currentZoom/2;  if (ratio > 4 || ratio < 1 || ratio == currentZoom)    return;  if (ratio == 1){    document.getElementById('Map:ZoomIn').setAttribute('disabled', 'false');    document.getElementById('Map:ZoomOut').setAttribute('disabled', 'true');    document.getElementById('Map:Apercent').setAttribute('checked', 'true');    document.getElementById('Map:Bpercent').setAttribute('checked', 'false');    document.getElementById('Map:Cpercent').setAttribute('checked', 'false');  }  else if (ratio == 4){    document.getElementById('Map:ZoomIn').setAttribute('disabled', 'true');    document.getElementById('Map:ZoomOut').setAttribute('disabled', 'false');    document.getElementById('Map:Apercent').setAttribute('checked', 'false');    document.getElementById('Map:Bpercent').setAttribute('checked', 'false');    document.getElementById('Map:Cpercent').setAttribute('checked', 'true');  }  else {    document.getElementById('Map:ZoomIn').setAttribute('disabled', 'false');    document.getElementById('Map:ZoomOut').setAttribute('disabled', 'false');    document.getElementById('Map:Apercent').setAttribute('checked', 'false');    document.getElementById('Map:Bpercent').setAttribute('checked', 'true');    document.getElementById('Map:Cpercent').setAttribute('checked', 'false');  }  objList = frameDoc.getElementsByName("hotspot");  len = objList.length;  for(i=0; i<len; i++){    if (ratio > currentZoom){      objList[i].style.width = (parseInt(objList[i].style.width)*(ratio/currentZoom))+"px";      objList[i].style.height = (parseInt(objList[i].style.height)*(ratio/currentZoom))+"px";      objList[i].style.top = (parseInt(objList[i].style.top)*(ratio/currentZoom))+"px";      objList[i].style.left = (parseInt(objList[i].style.left)*(ratio/currentZoom))+"px";    }    else{      objList[i].style.width = (parseInt(objList[i].style.width)/(currentZoom/ratio))+"px";      objList[i].style.height = (parseInt(objList[i].style.height)/(currentZoom/ratio))+"px";      objList[i].style.top = (parseInt(objList[i].style.top)/(currentZoom/ratio))+"px";      objList[i].style.left = (parseInt(objList[i].style.left)/(currentZoom/ratio))+"px";    }    if (objList[i].getAttribute("class") == "poly"){      pointList = objList[i].childNodes;      plen = pointList.length;      dump('i='+i+'\n');      for(j=0; j<plen; j++){        dump('i='+i+'\n');        if (ratio > currentZoom){          pointList[j].style.top = (parseInt(pointList[j].style.top)*(ratio/currentZoom))+"px";          pointList[j].style.left = (parseInt(pointList[j].style.left)*(ratio/currentZoom))+"px";        }        else{          pointList[j].style.top = (parseInt(pointList[j].style.top)/(currentZoom/ratio))+"px";          pointList[j].style.left = (parseInt(pointList[j].style.left)/(currentZoom/ratio))+"px";        }      }      currentPoly = objList[i];      polyFinish(null, true);      currentPoly = null;    }    dump('i='+i+'\n');  }    imgEl = frameDoc.getElementById("mainImg");  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");  }  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");  }  currentZoom = ratio;  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/88bbd13145f64fbd2fab199adb22e608c4d03186/EdImageMapShapes.js/clean/editor/ui/dialogs/content/EdImageMapShapes.js