clean up clearGrid()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1150 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -360,14 +360,11 @@ OpenLayers.Layer.Grid.prototype =
|
|||||||
*/
|
*/
|
||||||
clearGrid:function() {
|
clearGrid:function() {
|
||||||
if (this.grid) {
|
if (this.grid) {
|
||||||
while(this.grid.length > 0) {
|
for(var iRow=0; iRow < this.grid.length; iRow++) {
|
||||||
var row = this.grid[0];
|
var row = this.grid[iRow];
|
||||||
while(row.length > 0) {
|
for(var iCol=0; iCol < row.length; iCol++) {
|
||||||
var tile = row[0];
|
row[iCol].clear();
|
||||||
tile.destroy();
|
|
||||||
row.remove(tile);
|
|
||||||
}
|
}
|
||||||
this.grid.remove(row);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user