07-11-2023 06:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-11-2023 06:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
What's the best way to detect multiple taps?
Author | ch, passion for improvement.
Answered! Go to the Best Answer.

Accepted Solutions
07-11-2023 06:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-11-2023 06:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@francogrex - here is a sample tap detection
tapR.onclick = function() {
baseCount++;
// after 400 ms see how many taps have occurred and react accordingly
setTimeout(function(){
if ( baseCount == 1) { // scroll up
consolelog("scrollup tap click");
}
if ( baseCount == 2) { //scroll down
consolelog("scrolldown tap click");
}
console.log("tap reset click count");
baseCount = 0;
}, 400);
}
Author | ch, passion for improvement.

07-11-2023 06:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-11-2023 06:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@francogrex - here is a sample tap detection
tapR.onclick = function() {
baseCount++;
// after 400 ms see how many taps have occurred and react accordingly
setTimeout(function(){
if ( baseCount == 1) { // scroll up
consolelog("scrollup tap click");
}
if ( baseCount == 2) { //scroll down
consolelog("scrolldown tap click");
}
console.log("tap reset click count");
baseCount = 0;
}, 400);
}
Author | ch, passion for improvement.

