This commit is contained in:
Emmaline Autumn 2023-10-23 14:09:18 -06:00
parent e4de886646
commit 6661936188

View File

@ -81,6 +81,7 @@ export class Doodler {
}
protected draw() {
this.ctx.clearRect(0, 0, this.width, this.height);
this.ctx.fillStyle = this.bg;
this.ctx.fillRect(0, 0, this.width, this.height);
// for (const d of this.draggables.filter(d => d.beingDragged)) {
@ -245,6 +246,10 @@ export class Doodler {
this.ctx.strokeText(text, pos.x, pos.y, maxWidth);
}
clearRect(at: Vector, width: number, height: number) {
this.ctx.clearRect(at.x, at.y, width, height);
}
// Interaction
mouseX = 0;