[OpenLayers-Commits] r4743 - sandbox/pagameba/transition/lib/OpenLayers
commits at openlayers.org
commits at openlayers.org
Mon Oct 1 17:08:15 EDT 2007
Author: pagameba
Date: 2007-10-01 17:08:14 -0400 (Mon, 01 Oct 2007)
New Revision: 4743
Modified:
sandbox/pagameba/transition/lib/OpenLayers/Tile.js
Log:
destroy backBufferTiles if necessary. Also, avoid a potential problem with end transitions if the tile has already been destroyed.
Modified: sandbox/pagameba/transition/lib/OpenLayers/Tile.js
===================================================================
--- sandbox/pagameba/transition/lib/OpenLayers/Tile.js 2007-10-01 21:00:18 UTC (rev 4742)
+++ sandbox/pagameba/transition/lib/OpenLayers/Tile.js 2007-10-01 21:08:14 UTC (rev 4743)
@@ -116,6 +116,10 @@
this.events.destroy();
this.events = null;
+
+ if (this.backBufferTile) {
+ this.backBufferTile.destroy();
+ }
},
@@ -272,12 +276,14 @@
* current position/bounds and hide it for the next transition
*/
endTransition: function() {
- this.backBufferTile.position = this.position.clone();
- this.backBufferTile.bounds = this.bounds.clone();
- this.backBufferTile.size = this.size.clone();
- this.backBufferTile.resolution = this.layer.getResolution();
- this.backBufferTile.renderTile();
- this.backBufferTile.clear();
+ if (this.position) {
+ this.backBufferTile.position = this.position.clone();
+ this.backBufferTile.bounds = this.bounds.clone();
+ this.backBufferTile.size = this.size.clone();
+ this.backBufferTile.resolution = this.layer.getResolution();
+ this.backBufferTile.renderTile();
+ this.backBufferTile.clear();
+ }
},
CLASS_NAME: "OpenLayers.Tile"
More information about the Commits
mailing list