X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/97dba0fbbe63fcccd3d36c5b577a12dce7c47ca7..c2333c603e1ad3352109a05150f2c47ad468f7ef:/app/views/site/_resize.html.erb?ds=sidebyside diff --git a/app/views/site/_resize.html.erb b/app/views/site/_resize.html.erb index a6583762f..f26e2248c 100644 --- a/app/views/site/_resize.html.erb +++ b/app/views/site/_resize.html.erb @@ -18,12 +18,16 @@ function resizeMap() { var content_width = $("#content").width(); var content_height = $("#content").height(); - var sidebar_width = 0 + $("#sidebar:visible").outerWidth(true); + var sidebar_width = 0; var left_border = parseFloat($("#map").css("border-left-width")); var right_border = parseFloat($("#map").css("border-right-width")); var top_border = parseFloat($("#map").css("border-top-width")); var bottom_border = parseFloat($("#map").css("border-bottom-width")); + $("#sidebar:visible").each(function () { + sidebar_width = sidebar_width + $(this).outerWidth(true); + }); + <% if t('html.dir') == "ltr" -%> $("#map").css("left", (sidebar_width) + "px"); <% else -%>