clearing
This commit is contained in:
parent
e4de886646
commit
6661936188
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user