From 2e574edef69c9983a6fd861d8b9e1fa200765d40 Mon Sep 17 00:00:00 2001 From: shish Date: Mon, 16 Jul 2007 06:34:57 +0000 Subject: [PATCH] only zoom out when necessary git-svn-id: file:///home/shish/svn/shimmie2/trunk@283 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/zoom/theme.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/zoom/theme.php b/ext/zoom/theme.php index 1e634997..0c95f5a7 100644 --- a/ext/zoom/theme.php +++ b/ext/zoom/theme.php @@ -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";