summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2024-02-15 17:46:14 +0200
committerMartial Simon <msimon_fr@hotmail.com>2024-02-15 17:46:14 +0200
commit73dc55bb95e8e4c9bcf6195ef76a06c2d3285a8b (patch)
treed53e1f25d783e32dbd77f1001732f316f3614945 /index.js
parent2654f648a82b29c7b6df7aaeccf0e8ddc9ec7f47 (diff)
fix: fixed the canvas drawing
Diffstat (limited to 'index.js')
-rw-r--r--index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.js b/index.js
index fabec5f..aaaa397 100644
--- a/index.js
+++ b/index.js
@@ -36,6 +36,8 @@ canvas.addEventListener('mouseup', (e) => {
ctx.beginPath();
});
+canvas.addEventListener('mousemove', draw);
+
function redrawCanvas() {
canvas.width = window.innerWidth - canvasOffsetX * 2;
canvas.height = window.innerHeight - canvasOffsetY * 2;