Skip to content

Commit c0543d7

Browse files
committed
Clear canvas correctly after resize
1 parent c064e0f commit c0543d7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Flare/Drawing.purs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ runFlareDrawing controls canvasID ui = do
2929
let canvas = unsafePartial (fromJust mcanvas)
3030
ctx <- getContext2D canvas
3131

32-
w <- getCanvasWidth canvas
33-
h <- getCanvasHeight canvas
34-
3532
let render' drawing = do
33+
w <- getCanvasWidth canvas
34+
h <- getCanvasHeight canvas
3635
clearRect ctx { x: 0.0, y: 0.0, w, h }
3736
render ctx drawing
3837

0 commit comments

Comments
 (0)