fixing bug introduced in [184]. just needed to be dereferencing grid (this.grid) and also to be making sure to only try to clean out when the grid has actually been initialized. SOMEBODY PUT THIS BOY IN A SANDBOX UNTIL HE CAN LEARN TO RUN THE DAMN TESTS BEFORE CHECKING IN.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@186 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -238,14 +238,16 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
||||
* @private
|
||||
*/
|
||||
clearGrid:function() {
|
||||
while(grid.length > 0) {
|
||||
var row = grid[0];
|
||||
while(row.length > 0) {
|
||||
var tile = row[0];
|
||||
tile.destroy();
|
||||
row.remove(tile);
|
||||
if (this.grid) {
|
||||
while(this.grid.length > 0) {
|
||||
var row = this.grid[0];
|
||||
while(row.length > 0) {
|
||||
var tile = row[0];
|
||||
tile.destroy();
|
||||
row.remove(tile);
|
||||
}
|
||||
this.grid.remove(row);
|
||||
}
|
||||
grid.remove(row);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user