請(qǐng)問添加了hammer.js手勢庫后如何獲取當(dāng)前鼠標(biāo)位置代碼如下var list = document.querySelector('.slice-banner-list');var hammerdemo = new Hammer(list);hammerdemo.on('tap',function(e){var e = e || window.eventconsole.log(e.center.clientX) //不行console.log(e.gesture.touches[0].pageX) //不行 console.log(e.touches[0].clientX) //不行console.log(e.touches[0].clientX) //不行})list.addEventListener('touchstart',function(e){console.log(e.touches[0].clientX) //可以獲取坐標(biāo)})請(qǐng)問各位大神能指導(dǎo)一下如何在使用hammer.js下獲取當(dāng)前鼠標(biāo)的坐標(biāo)嗎?
請(qǐng)問hammer.js如何獲取當(dāng)前鼠標(biāo)坐標(biāo)??
Smart貓小萌
2018-09-03 13:13:56