]> git.openstreetmap.org Git - rails.git/commitdiff
Tell OpenLayers when we have resized the map
authorTom Hughes <tom@compton.nu>
Mon, 2 Jan 2012 17:10:06 +0000 (17:10 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 2 Jan 2012 17:10:06 +0000 (17:10 +0000)
app/views/site/_resize.html.erb

index c88f500527fd987c96d76fbe4ca0fddda3fa0402..d018cedc913206b87ffa04799a6231ee267eec02 100644 (file)
     <% end -%>
     $("#map").width($("#content").width() - sidebar_width - left_border - right_border);
     $("#map").height($("#content").height() - top_border - bottom_border);
     <% end -%>
     $("#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();
+    <% end -%>
   }
 
   function handleResize() {
   }
 
   function handleResize() {