From 58394465f44b5cda96874e4bafd431ae7c3dd365 Mon Sep 17 00:00:00 2001 From: Jacob Casper Date: Sat, 18 Apr 2020 23:33:39 -0500 Subject: [PATCH] Clear canvas on redraw --- frontend/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/index.js b/frontend/index.js index d49372f..26df246 100644 --- 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); -- 2.20.1