From aafd5c8b5a642f17f66476159a611c18077173bc Mon Sep 17 00:00:00 2001 From: RusFortunat Date: Fri, 15 Nov 2024 14:30:04 +0100 Subject: [PATCH] clear button fixed --- src/main/resources/templates/main-view.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/templates/main-view.html b/src/main/resources/templates/main-view.html index 38de33c..8aee2c4 100644 --- a/src/main/resources/templates/main-view.html +++ b/src/main/resources/templates/main-view.html @@ -139,8 +139,8 @@

Draw your number here

canvas.addEventListener('mouseup', drawend, false); function resetCanvas(){ - ctx.clearRect(0, 0, canvas.width, canvas.height); - ctx.fillRect(0, 0, 280, 280); + context.clearRect(0, 0, canvas.width, canvas.height); + context.fillRect(0, 0, 280, 280); }