only zoom out when necessary

git-svn-id: file:///home/shish/svn/shimmie2/trunk@283 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-16 06:34:57 +00:00
parent 061ed4a3fe
commit 2e574edef6

View file

@ -24,7 +24,8 @@ img.parentNode.insertBefore(msg_div, img);
orig_width = "";
function scale(img) {
if(img.style.width != "90%") {
// element.clientWidth is not part of the JS standard :(
if(img.style.width != "90%" && (img.clientWidth >= img.parentNode.clientWidth * 0.9)) {
origwidth = img.style.width;
img.style.width = "90%";
msg_div.style.display = "block";