Eliminate interpolation in resize JS
This commit is contained in:
parent
7ff77d9d3d
commit
21273d4164
1 changed files with 12 additions and 10 deletions
|
@ -7,11 +7,12 @@
|
|||
var rightMargin = parseInt(content.css("right"));
|
||||
var bottomMargin = parseInt(content.css("bottom"));
|
||||
|
||||
<% if t('html.dir') == "ltr" -%>
|
||||
content.width($(window).width() - content.prop("offsetLeft") - rightMargin);
|
||||
<% else -%>
|
||||
content.width($(window).width() - content.prop("offsetRight") - leftMargin);
|
||||
<% end -%>
|
||||
if ($("html").attr("dir") == "ltr") {
|
||||
content.width($(window).width() - content.prop("offsetLeft") - rightMargin);
|
||||
} else {
|
||||
content.width($(window).width() - content.prop("offsetRight") - leftMargin);
|
||||
}
|
||||
|
||||
content.height($(window).height() - content.prop("offsetTop") - bottomMargin);
|
||||
}
|
||||
|
||||
|
@ -28,11 +29,12 @@
|
|||
sidebar_width = sidebar_width + $(this).outerWidth(true);
|
||||
});
|
||||
|
||||
<% if t('html.dir') == "ltr" -%>
|
||||
$("#map").css("left", (sidebar_width) + "px");
|
||||
<% else -%>
|
||||
$("#map").css("right", (sidebar_width) + "px");
|
||||
<% end -%>
|
||||
if ($("html").attr("dir") == "ltr") {
|
||||
$("#map").css("left", (sidebar_width) + "px");
|
||||
} else {
|
||||
$("#map").css("right", (sidebar_width) + "px");
|
||||
}
|
||||
|
||||
$("#map").width(content_width - sidebar_width - left_border - right_border);
|
||||
$("#map").height(content_height - top_border - bottom_border);
|
||||
$("#map").trigger("resized");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue