RyanMullins / angular-hammer

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

Cannot scroll down when using swipe left/right #16

Closed markelarizaga closed 9 years ago

markelarizaga commented 9 years ago

Hi, I am trying to use the left/right swipe and it is working properly. The problem is that if I use them the element does not scroll down anymore as it did by default. What I want is to perform certain actions when swiping left/right but still let the element scroll down when making the down-to-top gesture. I thought this could be achieved by calling event.preventDefault() but it is not the case.

Am I forgeting anything here? Thanks in advance.

markelarizaga commented 9 years ago

Hello again, finally a did it. I was missing the directions option in the directive. Adding [{"type":"swipe","directions":"DIRECTION_HORIZONTAL"}] fixed the problem.

Thanks! Markel

RyanMullins commented 9 years ago

I am thinking this may be due to recognizers not being instantiated with a direction in my code. Reopening until I verify/fix this.