我只是想知道我们是否有一个基于closure-library 构建的特定库或框架,它是专门为触摸设备(Android 或 Ipad)设计的。我已经有了使用闭包库的网络应用程序,现在想要保持移动触摸设备或平板电脑的一致性。
其他库还有许多其他框架或插件,例如:
http://www.sencha.com/products/touch/ -- (Ext.js)
http://jqtouch.com/ -- (jquery)
我们对闭包库有类似的东西吗?
有人可以帮我解决这个问题吗?
最佳答案
据我所知,已经定义了普通的 TOUCH 事件
/**
* Constants for event names.
* @enum {string}
*/
goog.events.EventType = {
...
// WebKit touch events.
TOUCHSTART: 'touchstart',
TOUCHMOVE: 'touchmove',
TOUCHEND: 'touchend',
TOUCHCANCEL: 'touchcancel',
}
但是没有手势识别器。
如果您使用 Webkit(Safari) 触发的手势,则必须创建自己的 externs 文件。
https://developer.apple.com/library/iad/documentation/UserExperience/Reference/GestureEventClassReference/index.html#//apple_ref/javascript/cl/GestureEvent
关于touch - 移动触摸支持——在 Closure-library 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5699516/