diff options
| author | Jules Laplace <jules@okfoc.us> | 2017-05-09 14:18:29 +0200 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2017-05-09 14:18:29 +0200 |
| commit | ab4b2c65fc9c7deb41c62105f2523f949c07de7b (patch) | |
| tree | 4a2bcfb4d0419f7d1714343324ba62689486a037 /client | |
| parent | d4bf3654347561539f10bdf0d21895203d2b2b0a (diff) | |
trying again to disable zoom
Diffstat (limited to 'client')
| -rw-r--r-- | client/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/index.js b/client/index.js index 276ed2a..0bce22c 100644 --- a/client/index.js +++ b/client/index.js @@ -68,7 +68,8 @@ function add (x, y) { }) } else { - div.addEventListener('touchstart', function(){ + div.addEventListener('touchstart', function(e){ + e.preventDefault() kalimba.play( freq ) lastFreq = freq }) @@ -82,7 +83,7 @@ if (browser.isDesktop) { document.addEventListener('mouseup', () => { dragging = false }) } else { - document.addEventListener('touchstart', () => { dragging = true }) + document.addEventListener('touchstart', (e) => { e.preventDefault(); dragging = true }) document.addEventListener('touchmove', (e) => { e.preventDefault() const x = Math.floor( e.touches[0].pageX / s ) |
