Create a new reliable updatesize event.
The resize event is not fired in all browsers. What we actually need is an event that is called every time the updateSize method is called.
This commit is contained in:
@@ -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
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user