]> git.openstreetmap.org Git - rails.git/commitdiff
Resize the map div when the page load is complete (via onload) in case the
authorTom Hughes <tom@compton.nu>
Fri, 7 Mar 2008 00:26:57 +0000 (00:26 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 7 Mar 2008 00:26:57 +0000 (00:26 +0000)
page layout has changed since the initial sizing by the deferred script.

app/views/site/edit.rhtml
app/views/site/index.rhtml

index da2711c78728651d2caca98f460d7107f4fcf468..d2657d26f141627c1f4b9274f9869fd86820d993 100644 (file)
 
     resizeMap();
   }
 
     resizeMap();
   }
-
-  window.onresize = handleResize;
   
   handleResize();
   
   handleResize();
+
+  window.onload = handleResize;
+  window.onresize = handleResize;
 </script>
 <% end %>
 </script>
 <% end %>
index 97eeda5a88ca6171a327e172ddbf05a688b017b3..edd755ddb2bbf857f0558020a21d6175c177cf28 100644 (file)
@@ -177,9 +177,10 @@ by the OpenStreetMap project and it's contributors.
 
     resizeMap();
   }
 
     resizeMap();
   }
-
-  window.onresize = handleResize;
   
   mapInit();
   
   mapInit();
+
+  window.onload = handleResize;
+  window.onresize = handleResize;
 // -->
 </script>
 // -->
 </script>