Kinetics JS为移动设备“点击”或简单的“触摸”事件 [英] Kinetics JS “Click” or simple “Touch” event for Mobile device

查看:99
本文介绍了Kinetics JS为移动设备“点击”或简单的“触摸”事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用kinetic-v4.3.0-beta2.js



我想在群组中为ios& amp处理移动触摸事件android。



我是绑定事件,如下面



I am using kinetic-v4.3.0-beta2.js

I want to handle mobile touch event on group for ios & android.

I am binding event such as following

group.on('touchstart', function (evt) {

    $('#onpopMenu').popup("open", { x: leftPosition, y: topPosition });

});





我试过'touchend','touchstart'和'tap'



在Tap中取得了部分成功,但在这种情况下,形状是可拖动的,因此点击事件没有正确触发,因为对象将从它的位置移动。



但是如果形状不可拖动那么它就能正常工作。



我尝试了'touchend'和'touchstart'事件但弹出菜单在事件发生后关闭了iOs和android因为我正在通过触摸打开Jquery Mobile Popup小组!



当touchstart事件被触发时,弹出菜单只会打开2-3秒。



任何人都面临动能JS Mobile事件的同样问题?如何只用它来处理点击或触摸事件。



我检查了这个http://www.html5canvastutorials.com/kineticjs/html5-canvas-mobile-events/ [ ^ ]供参考,但没有运气!



我正在使用Phonegap + JQM + Kinetics JS开发应用程序



提前致谢!



I tried 'touchend', 'touchstart' and 'tap'

Got partial success in "Tap" but in that case, shape is draggable so tap event is not properly fire because object will move from it's place.

but if shape is not draggable then it will work fine.

I tried 'touchend' and 'touchstart' event also but popup menu is close after event fire in iOs and android as I am opening Jquery Mobile Popup by Touching group!

The popup menu will only open for 2-3 seconds when the touchstart event fired.

Anyone faced the same problem with kinetic JS Mobile events? How to handle only "Click" or "Touch" event with it.

I checked this http://www.html5canvastutorials.com/kineticjs/html5-canvas-mobile-events/[^] for reference but had no luck!

I am developing application with Phonegap + JQM + Kinetics JS

Thanks in advance!

推荐答案

' #onpopMenu')。popup( open,{x:leftPosition,y:topPosition});

});
('#onpopMenu').popup("open", { x: leftPosition, y: topPosition }); });





我试过'touchend','touchstart'和'tap'



在Tap中取得了部分成功,但在这种情况下,形状是可拖动的,因此点击事件没有正确触发,因为物体将从它的位置移动。



但是如果形状不可拖动那么它就能正常工作。



我试过'touchend'和'touchstart'事件但是弹出菜单在iOs和android事件发生后关闭,因为我正在通过触摸组打开Jquery Mobile Popup!



弹出菜单只会打开2-3秒touchstart事件被解雇了。



任何人都面临动能JS Mobile事件的同样问题?如何只用它来处理点击或触摸事件。



我检查了这个http://www.html5canvastutorials.com/kineticjs/html5-canvas-mobile-events/ [ ^ ]供参考,但没有运气!



我正在使用Phonegap + JQM + Kinetics JS开发应用程序



提前致谢!



I tried 'touchend', 'touchstart' and 'tap'

Got partial success in "Tap" but in that case, shape is draggable so tap event is not properly fire because object will move from it's place.

but if shape is not draggable then it will work fine.

I tried 'touchend' and 'touchstart' event also but popup menu is close after event fire in iOs and android as I am opening Jquery Mobile Popup by Touching group!

The popup menu will only open for 2-3 seconds when the touchstart event fired.

Anyone faced the same problem with kinetic JS Mobile events? How to handle only "Click" or "Touch" event with it.

I checked this http://www.html5canvastutorials.com/kineticjs/html5-canvas-mobile-events/[^] for reference but had no luck!

I am developing application with Phonegap + JQM + Kinetics JS

Thanks in advance!


这篇关于Kinetics JS为移动设备“点击”或简单的“触摸”事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆