Skip to content

Commit 048c4d3

Browse files
committed
clear grid before draw text
1 parent 0c999ae commit 048c4d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@
367367
ctx.textBaseline = "top";
368368

369369
const drawCharAt = (size, ch, x, y) => {
370+
ctx.clearRect(x, y, size, size);
370371
ctx.fillText(ch, x, y + yoffset);
371372
return (n => n > 0xF ? 0xF : n)(ctx.measureText(ch).width / size * 0xF);
372373
};

0 commit comments

Comments
 (0)