[英]iOS Spinning Wheel HTML5
我正在开发一个将在iOS设备和桌面上使用的webapp(没有触摸)。 我们使用引导程序使网站尽可能响应。
我们想要加入iOS中已知的纺车。 我们将以不同的方式设计它,但不是功能。
经过一番搜索,我发现了这个网站: http : //cubiq.org/spinning-wheel
但是,此脚本似乎只适用于支持触摸的设备。 是否可以编辑脚本以便它也适用于桌面?
我在脚本中发现这个可以在这里添加一个mouseClickHandler吗?
handleEvent: function (e) {
console.log(e.type);
if (e.type == 'touchstart') {
this.lockScreen(e);
if (e.currentTarget.id == 'sw-cancel' || e.currentTarget.id == 'sw-done') {
this.tapDown(e);
} else if (e.currentTarget.id == 'sw-frame') {
this.scrollStart(e);
}
} else if (e.type == 'touchmove') {
this.lockScreen(e);
if (e.currentTarget.id == 'sw-cancel' || e.currentTarget.id == 'sw-done') {
this.tapCancel(e);
} else if (e.currentTarget.id == 'sw-frame') {
this.scrollMove(e);
}
} else if (e.type == 'touchend') {
if (e.currentTarget.id == 'sw-cancel' || e.currentTarget.id == 'sw-done') {
this.tapUp(e);
} else if (e.currentTarget.id == 'sw-frame') {
this.scrollEnd(e);
}
} else if (e.type == 'webkitTransitionEnd') {
if (e.target.id == 'sw-wrapper') {
this.destroy();
} else {
this.backWithinBoundaries(e);
}
} else if (e.type == 'orientationchange') {
this.onOrientationChange(e);
} else if (e.type == 'scroll') {
this.onScroll(e);
}
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.