From 73dc55bb95e8e4c9bcf6195ef76a06c2d3285a8b Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Thu, 15 Feb 2024 17:46:14 +0200 Subject: fix: fixed the canvas drawing --- index.js | 2 ++ style.css | 7 ++----- 2 files changed, 4 insertions(+), 5 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; diff --git a/style.css b/style.css index 8866db5..55f2e5c 100644 --- a/style.css +++ b/style.css @@ -13,9 +13,6 @@ canvas { position: absolute; left: 20px; border: 3px dashed orange; - padding: 4px -} - -#instructions:hover { - display: none; + padding: 4px; + pointer-events: none; } \ No newline at end of file -- cgit v1.2.3