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

View File

@@ -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);