Open liuqqcode opened 3 years ago
在真机上滑动出现卡顿,滑不动的问题,在ec-canvas.js的 touchStart 和touchMove里面加入 var touch = this.getTouch(e.touches);
touchStart
touchMove
var touch = this.getTouch(e.touches);
getTouch方法 getTouch(touches){ let touch ; for (let i = 0; i < touches.length; ++i) { touch = touches[i]; if(touch.x && touch.y){ touch.offsetX = touch.x; touch.offsetY = touch.y; break } } return touch; },
getTouch
getTouch(touches){ let touch ; for (let i = 0; i < touches.length; ++i) { touch = touches[i]; if(touch.x && touch.y){ touch.offsetX = touch.x; touch.offsetY = touch.y; break } } return touch; },
确实有用,谢谢!
牛逼
试试看
在真机上滑动出现卡顿,滑不动的问题,在ec-canvas.js的
touchStart
和touchMove
里面加入var touch = this.getTouch(e.touches);
getTouch
方法getTouch(touches){ let touch ; for (let i = 0; i < touches.length; ++i) { touch = touches[i]; if(touch.x && touch.y){ touch.offsetX = touch.x; touch.offsetY = touch.y; break } } return touch; },