comparing backBufferData.resolution and serverResolution to know if backbuffering should be applied is wrong

This commit is contained in:
Éric Lemoine
2011-10-29 21:10:23 +02:00
parent c80746b890
commit 8df1ae0e09
+5 -8
View File
@@ -285,14 +285,12 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
// an ill-positioned image will be visible during the zoom // an ill-positioned image will be visible during the zoom
// transition. // transition.
if(lastResolution !== serverResolution && if(zoomChanged && this.transitionEffect !== 'resize') {
this.transitionEffect !== 'resize') {
this.removeBackBuffer(); this.removeBackBuffer();
} }
if(lastResolution === serverResolution || if(!zoomChanged || (lastResolution &&
(lastResolution && this.transitionEffect === 'resize')) {
this.transitionEffect === 'resize')) {
this.applyBackBuffer(serverResolution); this.applyBackBuffer(serverResolution);
} }
@@ -325,9 +323,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
} }
if(forceReTile) { if(forceReTile) {
if(this.transitionEffect === 'resize' && if(zoomChanged && this.transitionEffect === 'resize' &&
(lastResolution && lastResolution) {
(lastResolution !== serverResolution))) {
this.applyBackBuffer(serverResolution); this.applyBackBuffer(serverResolution);
} }
this.initGriddedTiles(bounds); this.initGriddedTiles(bounds);