From a03c584a98f3e27eb9877121c2011393a250c9f7 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 7 Mar 2008 00:26:57 +0000 Subject: [PATCH] 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. --- app/views/site/edit.rhtml | 5 +++-- app/views/site/index.rhtml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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; // --> -- 2.43.2