From 06d2b4229d93071afc0d4d21ea1fc821554a3dcb Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 4 Feb 2010 19:49:10 +0000 Subject: [PATCH] Making it so the Map constructor doesn't fail when the provided viewport element isn't displayed. r=ahocevar (closes #2461) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10022 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Map.js | 44 ++++++++++++++++++++++--------------------- tests/Map.html | 21 +++++++++++++++++++++ 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index e545113d2a..cdb1bc01de 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -1326,30 +1326,32 @@ OpenLayers.Map = OpenLayers.Class({ */ updateSize: function() { // the div might have moved on the page, also - this.events.clearMouseCache(); var newSize = this.getCurrentSize(); - var oldSize = this.getSize(); - if (oldSize == null) { - this.size = oldSize = newSize; - } - if (!newSize.equals(oldSize)) { - - // store the new size - this.size = newSize; - - //notify layers of mapresize - for(var i=0, len=this.layers.length; i
+