I'm having issues finding / figuring out how to add options to hammer.js when using it's jQuery plugin. This is how I initiate hammer:
/* Create Hammer object for swipable game cards */
$('.game-card-mobile')
.hammer()
.bind('swiperight swipeleft press', function(ev) {
console.log(ev.type);
});
I find it that in order for swipe action to be performed a relatively fast swipe needs to occur, I want to decrease speed of swipe required to fire the event. After reading through the docs: http://hammerjs.github.io/recognizer-swipe/ There seems to be a velocity option that defaults to 0.65, so I assume this can be changed somehow to lets say 0.5 in order to fire event on slower swipes?
EDIT: if this would be of any help here are some examples of tests for swipe written in javascript: https://github.com/hammerjs/hammer.js/blob/master/tests/unit/gestures/test_swipe.js
this shows example of how {threshold: 1}
is set, I'm trying to achieve this while using jQuery plugin.