RyanMullins / angular-hammer

Hammer.js v2 support for AngularJS
http://ryanmullins.github.io/angular-hammer/
MIT License
188 stars 55 forks source link

mixing tap and doubletap on the same element not working on the latest version #35

Open equilerex opened 9 years ago

equilerex commented 9 years ago

Using the latest version, tap and double tap can't be used at the same time on the same element,

the issue seems to be that the "type" passed into "function addRecognizer (manager, type)" is in one case an object {type:tap} instead of string "tap"

ive made an example here (see the console for errors and button actions): http://codepen.io/anon/pen/ByYMqx

mattmcdonald-uk commented 9 years ago

You can work around this bug (one way: do a typeof check on type, if object use type.type), but doing so will cause several tap events to be fired for every doubletap.

To avoid that you would need to make use of requireFailure, but that is a current issue (#23).

Perhaps fixing this should be part of the work for #24?

equilerex commented 9 years ago

yeah, i tried it with type.type but since the old version was working fine, i just continued using that one til it gets a fix... just wanted to point it out if it had not already been found ;)

RyanMullins commented 9 years ago

Check out the fix in #36, I think that will address your issue. I'm swamped with other stuff at the moment, so this won't be published in a release until at least the weekend (21 Feb 2015).

luohaoGit commented 9 years ago

have your problem solved?

kfei commented 8 years ago

@RyanMullins Any plan on publishing next release to include #36? Thanks a lot!