Remove 'drawn' property from Tiles. (Closes #1018)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4557 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-09-28 20:45:31 +00:00
parent af2f5b6577
commit eacfa2b88a
3 changed files with 3 additions and 34 deletions

View File

@@ -548,18 +548,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
break;
}
};
if (this.buffer == 0) {
for (var r=0, rl=this.grid.length; r<rl; r++) {
var row = this.grid[r];
for (var c=0, cl=row.length; c<cl; c++) {
var tile = row[c];
if (!tile.drawn &&
tile.bounds.intersectsBounds(bounds, false)) {
tile.draw();
}
}
}
}
},
/**

View File

@@ -72,12 +72,6 @@ OpenLayers.Tile = OpenLayers.Class({
*/
position: null,
/**
* Property: drawn
* {Boolean} false
*/
drawn: false,
/**
* Property: isLoading
* {Boolean} Is the tile loading?
@@ -144,20 +138,9 @@ OpenLayers.Tile = OpenLayers.Class({
var withinMaxExtent = (maxExtent &&
this.bounds.intersectsBounds(maxExtent, false));
var mapExtent = this.layer.map.getExtent();
var withinMapExtent = (mapExtent &&
this.bounds.intersectsBounds(mapExtent, false));
// There are two cases where we *wouldn't* want to draw the tile:
//
// 1) If the tile is outside its layer's maxExtent
// 2) When the layer's buffer is 0, if the tile is outside the map's
// extent (out of view)
//
// ...what we return is the opposite of the above conditions :-)
//
return ( (withinMaxExtent || this.layer.displayOutsideMaxExtent) &&
(withinMapExtent || (this.layer.buffer != 0)) );
// The only case where we *wouldn't* want to draw the tile is if the
// tile is outside its layer's maxExtent.
return (withinMaxExtent || this.layer.displayOutsideMaxExtent);
},
/**
@@ -175,7 +158,6 @@ OpenLayers.Tile = OpenLayers.Class({
redraw = true;
}
this.drawn = false;
this.bounds = bounds.clone();
this.position = position.clone();
if (redraw) {

View File

@@ -123,7 +123,6 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
OpenLayers.Util.modifyDOMElement(this.imgDiv,
null, null, imageSize) ;
}
this.drawn = true;
return true;
},