From ab4b2c65fc9c7deb41c62105f2523f949c07de7b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 9 May 2017 14:18:29 +0200 Subject: trying again to disable zoom --- client/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/index.js') 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 ) -- cgit v1.2.3-70-g09d2