Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double Tap #31

Open
tomhoogenboom opened this issue Feb 26, 2015 · 8 comments
Open

Double Tap #31

tomhoogenboom opened this issue Feb 26, 2015 · 8 comments

Comments

@tomhoogenboom
Copy link

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?

@wzr1337
Copy link
Owner

wzr1337 commented Apr 3, 2015

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

@jpeterson88
Copy link

@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".

@aszharite
Copy link

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

@roblav96
Copy link

roblav96 commented Oct 6, 2015

still have this problem here also :/

@johannesjo
Copy link
Contributor

I'm also experiencing this unfortunately.

@botjaeger
Copy link

guys? is it fixed?

@vukasin-bozovic
Copy link

I have the same problem. :/

@anztenney
Copy link

anztenney commented Feb 16, 2017

This worked for me:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants