summaryrefslogtreecommitdiff
path: root/client/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-05-09 14:18:29 +0200
committerJules Laplace <jules@okfoc.us>2017-05-09 14:18:29 +0200
commitab4b2c65fc9c7deb41c62105f2523f949c07de7b (patch)
tree4a2bcfb4d0419f7d1714343324ba62689486a037 /client/index.js
parentd4bf3654347561539f10bdf0d21895203d2b2b0a (diff)
trying again to disable zoom
Diffstat (limited to 'client/index.js')
-rw-r--r--client/index.js5
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 )