From: Jacob Casper Date: Sun, 19 Apr 2020 04:33:39 +0000 (-0500) Subject: Clear canvas on redraw X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=58394465f44b5cda96874e4bafd431ae7c3dd365;p=brackets.git Clear canvas on redraw --- 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);