diff options
| author | julian laplace <julescarbon@gmail.com> | 2025-07-07 22:45:56 +0200 |
|---|---|---|
| committer | julian laplace <julescarbon@gmail.com> | 2025-07-07 22:45:56 +0200 |
| commit | f0fd04f18d6bb1d0cbf29d5d8fcae1647daa6bbc (patch) | |
| tree | 4e53e1c041c1c17882a980b74ad13884f301581d /bundle.js | |
| parent | 21b0b98d988be30852254e2977c8042f23b15252 (diff) | |
docs
Diffstat (limited to 'bundle.js')
| -rw-r--r-- | bundle.js | 37 |
1 files changed, 18 insertions, 19 deletions
@@ -30014,8 +30014,9 @@ function add(i, j) { } else { div.addEventListener("touchstart", function (e) { e.preventDefault(); - toggle(note); - erasing = !note.playing; + trigger(note); + // erasing = !note.playing; + dragging = true; lastNote = note; }); } @@ -30046,11 +30047,7 @@ function bind() { var note = notes[x][y]; if (note !== lastNote) { if (dragging) { - if (erasing) { - pause(note); - } else { - toggle(note); - } + trigger(note); } lastNote = note; } @@ -30068,18 +30065,20 @@ function bind() { document.querySelector("#help-button").addEventListener("click", function () { return document.querySelector("#help").classList.toggle("visible"); }); - grid.addEventListener("wheel", function (e) { - var new_base_x = Math.max(0, base_x + e.deltaX / 32); - var new_base_y = Math.max(0, base_y + e.deltaY / 32); - if (Math.round(base_x) !== Math.round(new_base_x) || Math.round(base_y) !== Math.round(new_base_y)) { - base_x = new_base_x; - base_y = new_base_y; - rebuild(); - } else { - base_x = new_base_x; - base_y = new_base_y; - } - }); + if (_util.browser.isDesktop) { + grid.addEventListener("wheel", function (e) { + var new_base_x = Math.max(0, base_x + e.deltaX / 32); + var new_base_y = Math.max(0, base_y + e.deltaY / 32); + if (Math.round(base_x) !== Math.round(new_base_x) || Math.round(base_y) !== Math.round(new_base_y)) { + base_x = new_base_x; + base_y = new_base_y; + rebuild(); + } else { + base_x = new_base_x; + base_y = new_base_y; + } + }); + } } var isReset = false; |
