From 168a16deb90a3fdbce2c21a1611341b560739a26 Mon Sep 17 00:00:00 2001 From: venister Date: Tue, 4 Sep 2007 10:13:31 +0000 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=A6=AC?= =?UTF-8?q?=EC=82=AC=EC=9D=B4=EC=A6=88=20=EB=A3=A8=ED=8B=B4=EC=9D=B4=20?= =?UTF-8?q?=ED=8A=B9=EC=A0=95=20=EC=83=81=ED=99=A9=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=EB=A5=BC=20=EC=9D=BC=EC=9C=BC=ED=82=A4?= =?UTF-8?q?=EB=8A=94=20=EA=B2=83=EC=9D=84=20=ED=95=B4=EA=B2=B0.(1000x667?= =?UTF-8?q?=EC=82=AC=EC=9D=B4=EC=A6=88,=20XE=ED=91=9C=EC=A4=80=EB=B8=94?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=8A=A4=ED=82=A8=20=EC=B2=A8=EB=B6=80?= =?UTF-8?q?=EC=8B=9C=20=EB=8A=98=EC=96=B4=EC=A7=90=20=ED=98=84=EC=83=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2490 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/common.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/js/common.js b/common/js/common.js index eedcf3cb5..fc512f926 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -200,9 +200,11 @@ function resizeImageContents() { obj.source_height = orig_img.height; if(obj_width >= parent_width) { - var per = parent_width/obj_width; - xWidth(obj, xWidth(parent)-1); - xHeight(obj, xHeight(obj)*per); + var new_w = xWidth(parent)-1; + var new_h = Math.round(xHeight(obj)*new_w/obj_width); + + xWidth(obj, new_w); + xHeight(obj, new_h); } xAddEventListener(obj,"click", showOriginalImage);