wzr1337 / angular-gestures

AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.
MIT License
509 stars 100 forks source link

Pinch and other events #38

Closed dannyockilson closed 5 years ago

dannyockilson commented 9 years ago

Having an issue with the pinch event in an app, I need to use pinch without blocking the standard scroll but can't work out how to do this.

There is an issue on the hammerjs repo for exactly what I'm wanting but not sure how to do this within the context of the angular wrapper?

https://github.com/hammerjs/hammer.js/issues/691

Deadline is looming and been scratching my head a little while on this so thought I'd reach out and see if there is a tried and tested solution.

Thanks,

wzr1337 commented 9 years ago

my module only wraps hammer, so if there is a base issue in hammer, it will also occur here. Is the isuue already fixed on the hammerJS side?

dannyockilson commented 9 years ago

Hi,

the issue is that in hammer if you set the pinch option to { enabled: false } it stops the element being blocking, in the angular wrapper it is still blocking not entirely sure why but I assume it's something to do with the recognizer being set adding the event listeners. I actually got round the issue by manually handling the scrolling events using pan/swipe which works but is a bit weird having to manually replicate the default browser behavior. I was in a bit of a rush at the time so didn't really have a chance to look through things properly so this may well just be human error somewhere, when I've got a bit of down time I'll run some tests and see if it's an issue or if I just messed it up.

Thanks