欢迎各位兄弟 发布技术文章
这里的技术是共享的
1 2 3 4 5 6 | var hammertime = new Hammer(document.getElementById( "test" )); hammertime.get( 'swipe' ).set({ direction: Hammer.DIRECTION_VERTICAL}); hammertime.on( "swipedown swipeup" , function (e) { console.log( "X偏移量:[" + e.deltaX + "],Y偏移量:[" + e.deltaY + "]" ); }); |