I've been working on a basic photo gallery that switches images during a drag event. However, I'm encountering an issue with the iOS7 browser where the drag event gets triggered multiple times when dragging left or right. I attempted to use a global variable to track if the previous event had not ended, but I couldn't get it to work. I also experimented with some options from hammer.js, but had no success. Do you have any suggestions for resolving this problem?
$picWrapper.hammer({}).on("dragright", function(event) {
event.preventDefault();
PhotoGallery.Browse.next();
}).on("dragleft", function(event){
event.preventDefault();
PhotoGallery.Browse.prev();
});