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:
parent
061ed4a3fe
commit
2e574edef6
1 changed files with 2 additions and 1 deletions
|
@ -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";
|
||||
|
|
Reference in a new issue