[OpenLayers-Commits] r12263 -
sandbox/mpriour/temporal_map/openlayers/lib/OpenLayers/Tile
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Aug 18 12:01:10 EDT 2011
Author: mpriour
Date: 2011-08-18 09:01:09 -0700 (Thu, 18 Aug 2011)
New Revision: 12263
Modified:
sandbox/mpriour/temporal_map/openlayers/lib/OpenLayers/Tile/BackBufferable.js
Log:
Merge in ahoceavar's BackBufferable changes to create smooth refreshes for tiled layers
Modified: sandbox/mpriour/temporal_map/openlayers/lib/OpenLayers/Tile/BackBufferable.js
===================================================================
--- sandbox/mpriour/temporal_map/openlayers/lib/OpenLayers/Tile/BackBufferable.js 2011-08-18 15:51:45 UTC (rev 12262)
+++ sandbox/mpriour/temporal_map/openlayers/lib/OpenLayers/Tile/BackBufferable.js 2011-08-18 16:01:09 UTC (rev 12263)
@@ -116,16 +116,17 @@
updateBackBuffer: function() {
var layer = this.layer, map = layer.map,
backBufferMode = this.backBufferMode,
- data = this.backBufferData,
+ mode = this.backBufferMode,
tile = this.getTile(),
backBuffer = data.tile,
resolution = data.resolution,
ratio = resolution ? resolution / map.getResolution() : 1,
+ refresh = this.bounds.equals(data.bounds),
// Cases where we don't position and return a back buffer, but only
// update backBufferData and return undefined:
- // (1) current ratio and backBufferMode dont't require a backbuffer
- notNeeded = !(ratio == 1 ? backBufferMode & 1 : backBufferMode & 2),
+ // (1) current refresh/ratio/mode state doesn't require a buffer
+ notNeeded = !(ratio == 1 ? (refresh || mode & 1) : mode & 2),
// (2) the tile is not appended to the layer's div
noParent = tile && tile.parentNode !== layer.div,
// (3) we don't have a tile available that we could use as buffer
More information about the Commits
mailing list