RyanMullins / angular-hammer

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

Sections swipe #64

Open davidcandreva opened 8 years ago

davidcandreva commented 8 years ago

I have 3 sections that can be swiped through in a cordova app.

<section hm-swipe-left="swipe('next')" hm-swipe-right="swipe('previous')">
<h1>long content page 1</h2>
</section>

<section hm-swipe-left="swipe('next')" hm-swipe-right="swipe('previous')">
<h1>long content page 2</h2>
</section>

<section hm-swipe-left="swipe('next')" hm-swipe-right="swipe('previous')">
<h1>long content page 2</h2>
</section>

The problem is that when the content is long, those sections aren't scrollable anymore.

I already tried a bunch of options that should fix this but not one is working appropriate.

Hope someone can help us with this.

svenpeeters commented 8 years ago

+1

martinmcwhorter commented 8 years ago

+1

This issue seems to affect iOS. We are not seeing it on Android.

martinmcwhorter commented 8 years ago

Ok its looks like I have found a solution. I had a similar template:

<div hm-swiperight="prev()"
    hm-swipeleft="next()">

I sorted it by adding a recognizer

<div hm-swiperight="prev()"
    hm-swipeleft="next()"
    hm-recognizer-options='[{"type":"swipe","directions":"DIRECTION_HORIZONTAL"}]'>

So now the up and down swipes are not captured.

davidcandreva commented 8 years ago

@martinmcwhorter doesn't to work in our project.

epotockiy commented 8 years ago

+1 :(

swinston1000 commented 7 years ago

@martinmcwhorter - thanks so so much!!!