From bc780edcec0837b1d56c9b17f105c6d2b7507c30 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Wed, 9 Aug 2006 04:18:18 +0000 Subject: [PATCH] Fix test failures by changing the failover mode to check for existince of needed variables rather than storing 'newGrid' git-svn-id: http://svn.openlayers.org/trunk/openlayers@1141 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Grid.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index ee1f876cf2..ae4b72d3f8 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -219,12 +219,11 @@ OpenLayers.Layer.Grid.prototype = do { var row; - - if (newGrid) { + + row = this.grid[rowidx++]; + if (!row) { row = new Array(); this.grid.push(row); - } else { - row = this.grid[rowidx++]; } tileoffsetlon = startLon; @@ -247,12 +246,12 @@ OpenLayers.Layer.Grid.prototype = var px = new OpenLayers.Pixel(x, y); var tile; - if (newGrid) { + tile = row[colidx++]; + if (!tile) { tile = this.addTile(tileBounds, px); tile.draw(); row.push(tile); } else { - tile = row[colidx++]; tile.moveTo(tileBounds, px); }