RyanMullins / angular-hammer

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

fixed bugs that useing in browserify will borken #19

Closed osdio closed 9 years ago

osdio commented 9 years ago

Now it works well with browserify.

RyanMullins commented 9 years ago

I've integrated these changes as part of some other work I was already doing. They'll be included in v2.1.3.

I want to develop some unit tests for this sort of thing. I'll close this issue, and #18 when I have finished those tests.

osdio commented 9 years ago

OK, BTW, another questions about hammer.js. When I use hm-panright, I find that my web-app can't scroll in mobile browsers. Do you know how to solve it ?

RyanMullins commented 9 years ago

There was a similar problem reported in #16. I am thinking this is most likely a problem in my code (with the recognizer not being initialized to support a direction) but it could be a bigger issue with Hammer. For the time being, try adding in an explicit directions definition using the hm-recognizer-options directive, like this:

<div hm-panright="someFunction" hm-recognizer-options='[{""type":"pan","directions":"DIRECTION_RIGHT"}]'></div>
osdio commented 9 years ago

No, it failed, it doesn't work.

RyanMullins commented 9 years ago

I have another issue tracing (#20) that is reporting the same problem with hm-panright. I'll keep you both posted as I work on a fix.