Is there a tap and double tap event in d3.js force directed graph

守給你的承諾、 提交于 2019-12-03 11:29:08
Mark Roper

D3 has the touches event and using this you can get touch position coordinates from inside your event handler, but this doesn't give you any special handling for or help identify long press and doubletap. You can add support for long press and double tap yourself. For long press, have a look at this example:

Long Press in JavaScript?

If you're using jQuery, there are doubletap plugins like this one:

jQuery doubletap plugin

Unfortunately, there is no double tap in d3, so as suggested before, you got to work with touchstart. Here is how

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!