From: Tom Hughes Date: Fri, 7 Mar 2008 00:26:57 +0000 (+0000) Subject: Resize the map div when the page load is complete (via onload) in case the X-Git-Tag: live~7896 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/a03c584a98f3e27eb9877121c2011393a250c9f7 Resize the map div when the page load is complete (via onload) in case the page layout has changed since the initial sizing by the deferred script. --- diff --git a/app/views/site/edit.rhtml b/app/views/site/edit.rhtml index da2711c78..d2657d26f 100644 --- a/app/views/site/edit.rhtml +++ b/app/views/site/edit.rhtml @@ -103,9 +103,10 @@ resizeMap(); } - - window.onresize = handleResize; handleResize(); + + window.onload = handleResize; + window.onresize = handleResize; <% end %> diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 97eeda5a8..edd755ddb 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -177,9 +177,10 @@ by the OpenStreetMap project and it's contributors. resizeMap(); } - - window.onresize = handleResize; mapInit(); + + window.onload = handleResize; + window.onresize = handleResize; // -->