开发者

HTML5 canvas drag events on iPhone (Safari or UIWebView)

开发者 https://www.devze.com 2023-01-13 12:46 出处:网络
I have a simple \"drag to draw\" doodle style HTML5/canvas implementation which uses the \'mousemove\' event on the canvas. E.g.:

I have a simple "drag to draw" doodle style HTML5/canvas implementation which uses the 'mousemove' event on the canvas. E.g.:

canvas.addEventListener( 'mousemove', drawingFunction, false );

This works fine on, say, Safari or FF on the desktop. However, 开发者_如何学Cwhen run on an iPhone, dragging only scrolls the webview around the screen.

Note that I've also tried out several other HTML5 drag-to-draw applets with Safari on the iPhone, and so far, they all seem to fail the same way.

Is it not possible to separate drag/mousemove events on the canvas from webview scroll events?

Thanks for any advice!


I ~think~ I found the solution: http://www.bennadel.com/blog/1867-Drawing-On-The-iPhone-Canvas-With-jQuery-And-ColdFusion.htm

0

精彩评论

暂无评论...
验证码 换一张
取 消