폰트 크기 변경에 따라 line-height 값도 변경되도록 함
This commit is contained in:
15
js/common.js
15
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user