Merge pull request #4918 from fredj/canvas_clear

Don't change the canvas size to clear it
This commit is contained in:
Frédéric Junod
2016-02-29 10:40:00 +01:00

View File

@@ -94,8 +94,9 @@ goog.inherits(ol.renderer.dom.VectorLayer, ol.renderer.dom.Layer);
* @inheritDoc
*/
ol.renderer.dom.VectorLayer.prototype.clearFrame = function() {
this.context_.canvas.width = 0;
this.context_.canvas.height = 0;
// Clear the canvas
var canvas = this.context_.canvas;
canvas.width = canvas.width;
this.renderedRevision_ = 0;
};