From 881e049425c3b8ca7989af24c93f57d2faaceec0 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 6 May 2013 09:47:31 +0900 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=EC=8B=9C=20=EB=86=92=EC=9D=B4?= =?UTF-8?q?=EA=B0=92=EC=9D=B4=20=EC=9E=88=EC=9D=84=20=EA=B2=BD=EC=9A=B0?= =?UTF-8?q?=EC=97=90=20=EB=8C=80=ED=95=9C=20=EC=BD=94=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skin/board/basic/view.skin.php | 7 +++++++ skin/board/gallery/view.skin.php | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/skin/board/basic/view.skin.php b/skin/board/basic/view.skin.php index 316767c06..cd3ab66ba 100644 --- a/skin/board/basic/view.skin.php +++ b/skin/board/basic/view.skin.php @@ -279,17 +279,24 @@ function view_image_resize() $img.each(function() { var img_width = $(this).width(); + var img_height = $(this).height(); var this_width = $(this).data("width"); + var this_height = $(this).data("height"); if(this_width == undefined) { $(this).data("width", img_width); // 원래 이미지 사이즈 + $(this).data("height", img_height); this_width = img_width; + this_height = img_height; } if(this_width > res_width) { $(this).width(res_width); + var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width")); + $(this).height(res_height); } else { $(this).width(this_width); + $(this).height(this_height); } }); } diff --git a/skin/board/gallery/view.skin.php b/skin/board/gallery/view.skin.php index 19ecc715b..7873cf3bd 100644 --- a/skin/board/gallery/view.skin.php +++ b/skin/board/gallery/view.skin.php @@ -277,17 +277,24 @@ function view_image_resize() $img.each(function() { var img_width = $(this).width(); + var img_height = $(this).height(); var this_width = $(this).data("width"); + var this_height = $(this).data("height"); if(this_width == undefined) { $(this).data("width", img_width); // 원래 이미지 사이즈 + $(this).data("height", img_height); this_width = img_width; + this_height = img_height; } if(this_width > res_width) { $(this).width(res_width); + var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width")); + $(this).height(res_height); } else { $(this).width(this_width); + $(this).height(this_height); } }); }