From 2843a186020ea5329c485b59d8de514f6b5576f8 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Thu, 16 Aug 2012 16:35:21 +0200 Subject: [PATCH] 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 39a6d7d8ef42860ff9d726af27715454573fb335. --- lib/OpenLayers/Map.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index ed90015b61..ab2cc1a928 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -588,13 +588,8 @@ OpenLayers.Map = OpenLayers.Class({ // Else updateSize on catching the window's resize // Note that this is ok, as updateSize() does nothing if the // map's size has not actually changed. - var me = this; - // We need to call this in the next cycle, otherwise it can cause - // 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); - }; + this.updateSizeDestroy = OpenLayers.Function.bind(this.updateSize, + this); OpenLayers.Event.observe(window, 'resize', this.updateSizeDestroy); }