0

So we can create a Hammer object and set change its options like this:

let mc = new Hammer(element);

mc.get('pan').set({ direction: Hammer.DIRECTION_NONE });

How can we set the options with the constructor?

This did not work:

let mc = new Hammer(element, [{'event' : 'pan', 'direction' : Hammer.DIRECTION_NONE}]);

1 Answer 1

0

Found the answer:

let swiper = new Hammer(element, {'recognizers' : [[Hammer.Pan, {direction : Hammer.DIRECTION_NONE}]]});

Not the answer you're looking for? Browse other questions tagged or ask your own question.