![](/img/trans.png)
[英]Is there a way in jQuery or Javascript to determine the speed of a touchmove event?
[英]javascript, is there a way to set a (smaller) threshold on touchmove event
此时,我的触摸输入设备在移动了多个像素后(在touchstart
事件之后)生成了一个touchmove
事件(我认为它大约是 10 个像素)这意味着当使用这种技术用我的手指在 canvas 上绘图时,曲线的第一部分始终是长度为 10 像素的直线。 我想要在touchmove
事件之后仅 2 或 3 个像素后的touchstart
事件。 我可以操纵某种阈值吗?
收到touchstart
事件后,立即添加一个记录pointermove
事件的侦听器,并将事件坐标存储到数组中。
然后,当您收到touchmove
事件时,您将拥有从收到touchstart
时开始的指针位置历史记录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.