debug tile display: remove the 'ok' tiles from screen when the refresh completes - makes it practical to leave the layer on at all times

This commit is contained in:
Jon Atkins 2014-03-02 01:02:40 +00:00
parent 611c35fb42
commit 0a506d3027
2 changed files with 12 additions and 0 deletions

View File

@ -49,3 +49,14 @@ window.RenderDebugTiles.prototype.setState = function(id,state) {
}
this.setColour (id, col, fill);
}
window.RenderDebugTiles.prototype.removeOkTiles = function() {
var _this = this;
$.each(this.debugTileToRectangle, function(id,layer) {
if (layer.options.color == '#0f0' && layer.options.color == '#0f0') {
_this.debugTileLayer.removeLayer(layer);
delete _this.debugTileToRectangle[id];
}
});
}

View File

@ -323,6 +323,7 @@ window.MapDataRequest.prototype.processRequestQueue = function(isFirstPass) {
if (Object.keys(this.queuedTiles).length == 0) {
this.render.endRenderPass();
this.debugTiles.removeOkTiles();
var endTime = new Date().getTime();
var duration = (endTime - this.refreshStartTime)/1000;