diff --git a/code/map_data_debug.js b/code/map_data_debug.js index 7796b809..0aff2b37 100644 --- a/code/map_data_debug.js +++ b/code/map_data_debug.js @@ -72,8 +72,11 @@ window.RenderDebugTiles.prototype.setState = function(id,state) { window.RenderDebugTiles.prototype.startTimer = function(waitTime) { var _this = this; - if (!this.timer) { - this.timer = setTimeout ( function() { _this.timer = undefined; _this.runClearPass(); }, waitTime ); + if (!_this.timer) { + // a timeout of 0 firing the actual timeout - helps things run smoother + _this.timer = setTimeout ( function() { + _this.timer = setTimeout ( function() { _this.timer = undefined; _this.runClearPass(); }, waitTime ); + }, 0); } }