Created
December 25, 2017 06:18
-
-
Save beardlessman/349521a07486daea1aafd4fe05d7ab5f to your computer and use it in GitHub Desktop.
options for hammerjs (fix chrome swipe bug)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options = { | |
touchAction: 'auto', | |
inputClass: Hammer.SUPPORT_POINTER_EVENTS ? Hammer.PointerEventInput : Hammer.TouchInput, | |
recognizers: [ | |
[Hammer.Swipe, { | |
direction: Hammer.DIRECTION_HORIZONTAL | |
}] | |
] | |
}; | |
let ham = new Hammer($element[0], options); | |
ham.on('swiperight', (event) => { | |
console.log(event.type); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment