Only clear canvas when necessary, add tests

This commit is contained in:
Tim Schaub
2017-09-24 10:58:01 -07:00
parent ecc2a9059e
commit 0f53d04361
6 changed files with 85 additions and 5 deletions

View File

@@ -228,6 +228,9 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame = function(frameState, layer
canvas.width = width;
canvas.height = height;
} else {
if (this.renderedExtent_ && !ol.extent.equals(imageExtent, this.renderedExtent_)) {
context.clearRect(0, 0, width, height);
}
oversampling = this.oversampling_;
}
}

View File

@@ -55,7 +55,7 @@ ol.Tile = function(tileCoord, state, opt_options) {
* @type {number}
*/
this.transition_ = options.transition === undefined ?
250 : options.transition;
275 : options.transition;
/**
* Lookup of start times for rendering transitions. If the start time is