From 8df1ae0e092079df5bd68bdf712471d729c7d580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Sat, 29 Oct 2011 21:10:23 +0200 Subject: [PATCH] comparing backBufferData.resolution and serverResolution to know if backbuffering should be applied is wrong --- lib/OpenLayers/Layer/Grid.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index eba00f5e4d..df9bafe49e 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -285,14 +285,12 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { // an ill-positioned image will be visible during the zoom // transition. - if(lastResolution !== serverResolution && - this.transitionEffect !== 'resize') { + if(zoomChanged && this.transitionEffect !== 'resize') { this.removeBackBuffer(); } - if(lastResolution === serverResolution || - (lastResolution && - this.transitionEffect === 'resize')) { + if(!zoomChanged || (lastResolution && + this.transitionEffect === 'resize')) { this.applyBackBuffer(serverResolution); } @@ -325,9 +323,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { } if(forceReTile) { - if(this.transitionEffect === 'resize' && - (lastResolution && - (lastResolution !== serverResolution))) { + if(zoomChanged && this.transitionEffect === 'resize' && + lastResolution) { this.applyBackBuffer(serverResolution); } this.initGriddedTiles(bounds);