From 4e5bc0234a48ac52730fbd16c5fb7347dd5293ad Mon Sep 17 00:00:00 2001 From: crschmidt Date: Thu, 8 Mar 2007 19:18:06 +0000 Subject: [PATCH] #520, patch by euzuro. This fixes a bug with resizing a WMS.Untiled layer, because the new map size was not set until *after* the onMapResize event. (oops.) This way, untiled layers redraw with the correct size. git-svn-id: http://svn.openlayers.org/trunk/openlayers@2532 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Map.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 2b824ef1b2..d264226cd3 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -595,13 +595,14 @@ OpenLayers.Map.prototype = { this.size = oldSize = newSize; if (!newSize.equals(oldSize)) { + // store the new size + this.size = newSize; + //notify layers of mapresize for(var i=0; i < this.layers.length; i++) { this.layers[i].onMapResize(); } - // store the new size - this.size = newSize; // the div might have moved on the page, also this.events.element.offsets = null;