diff --git a/lib/OpenLayers/Control/PanZoomBar.js b/lib/OpenLayers/Control/PanZoomBar.js index 8768be967d..a977ab69f6 100644 --- a/lib/OpenLayers/Control/PanZoomBar.js +++ b/lib/OpenLayers/Control/PanZoomBar.js @@ -99,7 +99,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { this.map.events.un({ "changebaselayer": this.redraw, - "resize": this.redraw, + "updatesize": this.redraw, scope: this }); @@ -119,7 +119,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { OpenLayers.Control.PanZoom.prototype.setMap.apply(this, arguments); this.map.events.on({ "changebaselayer": this.redraw, - "resize": this.redraw, + "updatesize": this.redraw, scope: this }); }, diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index a91f8703ef..c125f27f5e 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -83,6 +83,7 @@ OpenLayers.Map = OpenLayers.Class({ * mouseout - triggered after mouseout the map * mousemove - triggered after mousemove the map * changebaselayer - triggered after the base layer changes + * updatesize - triggered after the method was executed */ /** @@ -1490,6 +1491,7 @@ OpenLayers.Map = OpenLayers.Class({ } } + this.events.triggerEvent("updatesize"); }, /**