X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6fbdf8cca357ce2bf254903f089b76a40b7ee857..d0980087d1fafb872a9d6ce215fd75f26d88da20:/app/views/site/_resize.html.erb?ds=inline diff --git a/app/views/site/_resize.html.erb b/app/views/site/_resize.html.erb index d018cedc9..a6583762f 100644 --- a/app/views/site/_resize.html.erb +++ b/app/views/site/_resize.html.erb @@ -16,6 +16,8 @@ } function resizeMap() { + var content_width = $("#content").width(); + var content_height = $("#content").height(); var sidebar_width = 0 + $("#sidebar:visible").outerWidth(true); var left_border = parseFloat($("#map").css("border-left-width")); var right_border = parseFloat($("#map").css("border-right-width")); @@ -27,8 +29,8 @@ <% else -%> $("#map").css("right", (sidebar_width) + "px"); <% end -%> - $("#map").width($("#content").width() - sidebar_width - left_border - right_border); - $("#map").height($("#content").height() - top_border - bottom_border); + $("#map").width(content_width - sidebar_width - left_border - right_border); + $("#map").height(content_height - top_border - bottom_border); <% if params[:controller] == "site" and params[:action] == "index" -%> map.updateSize();