Hi I created a directive with the goal of intercepting single tap and double tap with HammerJs but it doesn't work the way I want it to and now I'm running out of ideas on how to solve the problem.
I tried this:
@HostListener('tap', ['$event'])
handleTaps(event) {
if(event.tapCount == 2) {
this.doubleTap.emit();
event.prevenDefault();
} else {
this.singleTap.emit();
event.prevenDefault();
}
}
The problem is that it does call Double Tap or double click but also the single tap before. What would be the solution to prevent this ? Use a set timeout ? Thanks