1.0.0-beta.5 β€’ Published 3 years ago

ph-gesture v1.0.0-beta.5

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

πŸš€ Welcome to your new awesome project!

This project has been created using webpack-cli, you can now run

npm i ph-gesture

update

  • touchmove event meta:{tx,ty,dx,dy,end,speed} usage
//ζ”―ζŒηš„ζ‰‹εŠΏδΊ‹δ»Ά
type TouchType = 'tap'|'longtap'|'swipe'|'swipeleft'|'swiperight'|'swipedown'|'swipeup'|'touchmove'
import PhGesture from 'ph-gesture'
const dom = document.body
const callback = (e:Event,type:string)=>{
    ///todo?
}
new PhGesture(dom,callback,'swipe',{select?:boolean,stop?:boolean,timeout?:number,capture?:boolean})
new PhGesture(dom,callback,'swipeleft')
new PhGesture(dom,callback,'swiperight')
new PhGesture(dom,callback,'swipetop')
new PhGesture(dom,callback,'swipebottom')
new PhGesture(dom,callback,'tap')
new PhGesture(dom,callback,'longtap')