Revert "fix issue with orientation changes on mobile devices (tested on Motorola Xoom 2 with Android 3.2.2 in the stock browser)"
This reverts commit 39a6d7d8ef.
This commit is contained in:
@@ -588,13 +588,8 @@ OpenLayers.Map = OpenLayers.Class({
|
|||||||
// Else updateSize on catching the window's resize
|
// Else updateSize on catching the window's resize
|
||||||
// Note that this is ok, as updateSize() does nothing if the
|
// Note that this is ok, as updateSize() does nothing if the
|
||||||
// map's size has not actually changed.
|
// map's size has not actually changed.
|
||||||
var me = this;
|
this.updateSizeDestroy = OpenLayers.Function.bind(this.updateSize,
|
||||||
// We need to call this in the next cycle, otherwise it can cause
|
this);
|
||||||
// issues on mobile devices on orientation change. It will use the
|
|
||||||
// height of the previous orientation otherwise.
|
|
||||||
this.updateSizeDestroy = function() {
|
|
||||||
window.setTimeout(function() { me.updateSize(); }, 0);
|
|
||||||
};
|
|
||||||
OpenLayers.Event.observe(window, 'resize',
|
OpenLayers.Event.observe(window, 'resize',
|
||||||
this.updateSizeDestroy);
|
this.updateSizeDestroy);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user