We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
感谢你精巧的手势库 问题:
AlloyFinger/alloy_finger.js
Line 187 in 4a34955
影响:比如在pressMove这里扩展panStart、pan事件,panStart可以通过判断delta方向决定preventDefault。在chrome上,一旦没有在第一个move阻止滚动,后面就会有cancelable = false
pressMove
panStart
pan
The text was updated successfully, but these errors were encountered:
你的意思是把
evt.deltaX = 0; evt.deltaY = 0;
改成:
evt.deltaX = current - this.x1; evt.deltaY = current - this.y1;
是吗?
Sorry, something went wrong.
呃对,这样改动是最小的。 其实我直接在start里面x2 = x1; y2 = y1了。暂时我只用到单指,多指逻辑还没考虑。 我是想问把start作为move的上一次事件有什么问题吗?觉得这样更顺一点。还不用null判断。
另外看到
Line 163 in 4a34955
Line 257 in 4a34955
所以想问,把start作为move上次事件写是不是更好?或者多指有什么考虑?
欢迎pr
No branches or pull requests
感谢你精巧的手势库
问题:
AlloyFinger/alloy_finger.js
Line 187 in 4a34955
在第一次move时这里是null,delta置0。
但是第一次move和start之间也是有delta的。为什么不把start看作move的上一次事件,从第一次move就计算delta?
影响:比如在
pressMove
这里扩展panStart
、pan
事件,panStart可以通过判断delta方向决定preventDefault。在chrome上,一旦没有在第一个move阻止滚动,后面就会有cancelable = falseThe text was updated successfully, but these errors were encountered: