0.0.1 • Published 8 years ago
longtap v0.0.1
Longtap
A module to support long tap event, longtap should not be triggered when:
- more than one finger on the screen
- touch event fired during the hold
Install
npm i longtap -S
Example
var longtap = require('longtap')
el.addEventListener('touchstart', longtap(function(e) {
console.log('fired')
}), false)
API
Longtap(handler, option)
handler
is event hanlder fortouchstart
eventoption.threshold
set the timeout to call the hanlder
handler is called with the save context and arguments as touchstart
0.0.1
8 years ago