projects
/
brackets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0230aa1
)
Clear canvas on redraw
author
Jacob Casper
<dev@jacobcasper.com>
Sun, 19 Apr 2020 04:33:39 +0000
(23:33 -0500)
committer
Jacob Casper
<dev@jacobcasper.com>
Sun, 19 Apr 2020 04:33:39 +0000
(23:33 -0500)
frontend/index.js
patch
|
blob
|
blame
|
history
diff --git
a/frontend/index.js
b/frontend/index.js
index
d49372f
..
26df246
100644
(file)
--- a/
frontend/index.js
+++ b/
frontend/index.js
@@
-125,6
+125,7
@@
const drawMatchup = (canvas, x, y, iter, maxIter, left, artists, baseCallback) =
}
const drawBracket = (canvas, artists) => {
+ const context = canvas.getContext("2d").clearRect(0, 0, canvas.width, canvas.height);
drawWinner(canvas);
const [mid_x, mid_y] = getCenter(canvas);
const [rect_width, rect_height] = getRectangleDimensions(canvas);