]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_resize.html.erb
Mobile layout improvements
[rails.git] / app / views / site / _resize.html.erb
index aa64e1d2b2344606e53a60a068dd2c03b621a7af..9ee05a7c83d04f713e24378c8ca524f2c29cc11d 100644 (file)
@@ -18,7 +18,7 @@
   function resizeMap() {
     var sidebar_width = 0 + $("#sidebar:visible").width();
 
-    if (sidebar_width > 0) {
+    if (sidebar_width > 0 && window.width > 641) {
       sidebar_width = sidebar_width + 5
     }
 
@@ -28,7 +28,9 @@
     $("#map").css("right", (sidebar_width) + "px");
     <% end -%>
     $("#map").width($("#content").width() - sidebar_width);
-    $("#map").height($("#content").height() - 2);
+    if (window.width > 641) {
+      $("#map").height($("#content").height() - 2);
+    }
   }
 
   function handleResize() {