summaryrefslogtreecommitdiff
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
parent2654f648a82b29c7b6df7aaeccf0e8ddc9ec7f47 (diff)
fix: fixed the canvas drawing
-rw-r--r--index.js2
-rw-r--r--style.css7
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