diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2024-02-15 17:46:14 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2024-02-15 17:46:14 +0200 |
| commit | 73dc55bb95e8e4c9bcf6195ef76a06c2d3285a8b (patch) | |
| tree | d53e1f25d783e32dbd77f1001732f316f3614945 | |
| parent | 2654f648a82b29c7b6df7aaeccf0e8ddc9ec7f47 (diff) | |
fix: fixed the canvas drawing
| -rw-r--r-- | index.js | 2 | ||||
| -rw-r--r-- | style.css | 7 |
2 files changed, 4 insertions, 5 deletions
@@ -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; @@ -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 |
