如何使用canvas API实现绘图功能中的描点操作?
- 内容介绍
- 文章标签
- 相关推荐
本文共计244个文字,预计阅读时间需要1分钟。
先区分是PC端还是移动端,然后利用touchstart(mousedown)、touchmove(mousemove)和touchend(mouseup)来处理事件。在move事件中重复点击那一块。
javascriptfunction tapClip() { // 区分PC端还是手机 var hastouch=ontouchstart in window ? touch : mouse;}
先区分是PC端还是移动端,然后利用touchstart(mousedown)、touchmove(mousemove)和touchend(mouseup)来处理就可以了,重点在move那一块。本文共计244个文字,预计阅读时间需要1分钟。
先区分是PC端还是移动端,然后利用touchstart(mousedown)、touchmove(mousemove)和touchend(mouseup)来处理事件。在move事件中重复点击那一块。
javascriptfunction tapClip() { // 区分PC端还是手机 var hastouch=ontouchstart in window ? touch : mouse;}
先区分是PC端还是移动端,然后利用touchstart(mousedown)、touchmove(mousemove)和touchend(mouseup)来处理就可以了,重点在move那一块。
