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:
1 parent
1d680df6d0
commit
7141d237d9
2 files changed
+4
-2
No files matched your search
@@ -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
|
||||
});
|
||||
},
|
||||
|
||||
@@ -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 <updateSize> method was executed
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -1490,6 +1491,7 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
|
||||
}
|
||||
}
|
||||
this.events.triggerEvent("updatesize");
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user