【发布时间】:2012-01-08 05:29:03
【问题描述】:
我正在尝试为 iPhone 创建一个 HTML5 Web 应用程序。我正在使用 jQuery Mobile。我的应用程序涉及在画布中绘图。它很像一个使用画布渲染草图的绘图应用程序。用户可以从任何方向在屏幕上滑动,应用程序应该能够计算出位置,然后在这些点上画线。
jQuery Mobile 只为滑动控件提供了以下一些基本事件,但我认为我需要对滑动进行更多控制,因为用户可以向任何方向滑动并且可以是任何像素长。另一方面,我应该能够捕捉到大部分的点,这样我就可以更清晰、更精确地想象这幅画了。
tap
Triggers after a quick, complete touch event.
taphold
Triggers after a held complete touch event (close to one second).
swipe
Triggers when a horizontal drag of 30px or more (and less than 20px vertically) occurs within 1 second duration.
swipeleft
Triggers when a swipe event occurred moving in the left direction.
swiperight
Triggers when a swipe event occurred moving in the right direction.
在 iOs 应用程序的画布中创建绘图应用程序时,我应该遵循任何其他技术吗?任何帮助将不胜感激。
【问题讨论】:
标签: jquery ios html jquery-mobile draggable