From 2919ba113ddb784f313b1d96fd8b546851738d92 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 28 Jun 2013 17:29:29 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8F=B0=ED=8A=B8=20=ED=81=AC=EA=B8=B0=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=97=90=20=EB=94=B0=EB=9D=BC=20line-height?= =?UTF-8?q?=20=EA=B0=92=EB=8F=84=20=EB=B3=80=EA=B2=BD=EB=90=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/common.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/js/common.js b/js/common.js index 2edf6cae2..6eeb997f7 100644 --- a/js/common.js +++ b/js/common.js @@ -394,10 +394,24 @@ $(function() { * 텍스트 리사이즈 **/ var default_font_size_saved = false; +var default_line_height_saved = false; function font_resize(id, act) { var $elements = $("#"+id+" *").not("select").not("option"); $elements.removeClass("applied"); + + // container의 기본 line-height 저장 + if(!default_line_height_saved) { + $("#"+id+" *").data("lh", $("#"+id+" *").css("line-height")); + default_line_height_saved = true; + } + + // 폰트 크기 변경에 따른 line-height 적용 + var lh = 1.5; + if(act == "default") + lh = $("#"+id+" *").data("lh"); + $("#"+id+" *").css("line-height", lh); + // 엘리먼트의 기본 폰트사이즈 저장 if(!default_font_size_saved) { save_default_font_size($elements); @@ -445,6 +459,7 @@ function set_font_size($el, act) break; default: nfsize = fsize; + lh = 1; break; }