angular-gestures icon indicating copy to clipboard operation
angular-gestures copied to clipboard

Double Tap

Open tomhoogenboom opened this issue 10 years ago • 8 comments

Thanks for the lib!

I was just playing around a little bit with all the events but I can't seem to get the 'double tap' working? Can somebody tell me what I'm doing wrong?

There's a preview on http://preview.tomhoogenboom.nl

In my view I have:

<div hm-double-tap="test($event)"></div>

In my app.config I'm having the following:

hammerDefaultOptsProvider.set({
        recognizers: [
          [Hammer.Tap, { time: 250 }],
          [Hammer.Swipe]
        ]
    });

If I add a [Hammer.DoubleTap] here I'm getting an error " TypeError: undefined is not a function" from hammer.js when it tries to loop through the recognizers.

Am I doing something wrong and can somebody please help me?

tomhoogenboom avatar Feb 26 '15 12:02 tomhoogenboom

I am also experiencing issues with double tap, trying to find out what the actual issue is

wzr1337 avatar Apr 03 '15 19:04 wzr1337

@tomhoogenboom it seems double tap is a tap with an interval between taps. If you look at the recognizers it shows it as Hammer.Tap, so it looks something like this:

     recognizers: [
         [Hammer.Tap, { enable: true }],
         [Hammer.Tap, { enable: true }, { event: 'doubletap', taps: 2 }, { interval: 600 }],
         [Hammer.Press, { enable: true }]
     ]

However, I am actually still getting errors with the double tap even with this code. My code is actually blowing out in hammer.js when it's trying to set "otherRecognizer".

jpeterson88 avatar May 29 '15 00:05 jpeterson88

Is this fixed? I am still getting 2 taps instead of a double-tap. My angularJS version is 1.3.15.

aszharite avatar Aug 04 '15 10:08 aszharite

still have this problem here also :/

roblav96 avatar Oct 06 '15 19:10 roblav96

I'm also experiencing this unfortunately.

johannesjo avatar Aug 22 '16 09:08 johannesjo

guys? is it fixed?

botjaeger avatar Aug 24 '16 04:08 botjaeger

I have the same problem. :/

vukasin-bozovic avatar Aug 30 '16 08:08 vukasin-bozovic

This worked for me:

recognizers: [
      [Hammer.Tap, {enabled:true}], 
      [Hammer.Tap, { event: 'doubletap', taps: 2 }, 'tap'], 
      [Hammer.Press, {enabled:true}]
]

anztenney avatar Feb 16 '17 04:02 anztenney