I am creating a simple web app that uses the new version of hammerJS for pinch zooming. I am having an issue with the default iOS page drag when a pinch starts. This seams to override the pinch event that I am attempting to capture. Any help stoping this while using hammerJS would be greatly appreciated.
PS: I have attempted to use event.preventDefault() to no avail.
You need to call preventDefault
slightly differently to how you may be used to. Like so:
$('#your_element').on('pinch', function(event) {
event.gesture.preventDefault();
});
See this hammer.js example for another example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With