Don't change the canvas size to clear it

This commit is contained in:
Frederic Junod
2016-02-25 15:47:45 +01:00
parent 941f220f3d
commit 2a1bc70b97

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;
};