Clear layers canvas before redraw

This commit is contained in:
jdescottes
2013-09-26 21:53:37 +02:00
parent 3a8d96f840
commit 50ca22d91a
2 changed files with 7 additions and 4 deletions

View File

@ -85,9 +85,10 @@
}
};
ns.FrameRenderer.prototype.clear = function (frame) {
var canvas = this.getCanvas_(frame);
canvas.getContext("2d").clearRect(0, 0, canvas.width, canvas.height);
ns.FrameRenderer.prototype.clear = function () {
if (this.canvas) {
this.canvas.getContext("2d").clearRect(0, 0, this.canvas.width, this.canvas.height);
}
};
/**