Skip to content

Commit a920894

Browse files
authored
Merge pull request #60 from JeremiasE/cleanrect
Clear the canvas in CanvasView before drawing
2 parents 8df6a97 + 8027400 commit a920894

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/widget.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ class CanvasView extends DOMWidgetView {
328328
}
329329

330330
updateCanvas() {
331+
this.clear();
331332
this.ctx.drawImage(this.model.canvas, 0, 0);
332333
}
333334

0 commit comments

Comments
 (0)