fitbit-gestures - npm
Sun Jun 27 2021 14:08:57 GMT+0000 (Coordinated Universal Time)
Saved by
@redflashcode
import { GestureDetector, GestureEvent } from 'fitbit-gestures';
// Get the element. You can also pass the element ID
const element = document.getElementById('detectorElement');
const detector = new GestureDetector(element)
.onTap((event: GestureEvent) => {
//Do something
})
.onDoubleTap((event: GestureEvent) => {
//Do something
})
.onLongPress((event: GestureEvent) => {
//Do something
})
.onSlide((event: GestureEvent) => {
//Do something
})
.onSwipe((event: GestureEvent) => {
//Do something
});
content_copyCOPY
https://www.npmjs.com/package/fitbit-gestures
Comments