antvis / F6

F6 is a graph visualization engine which provides quick and smooth operations on mobile devices.
https://f6.antv.vision
MIT License
133 stars 21 forks source link

h5 多端使用时 pc上的click和移动端的tap事件如何兼容处理 #147

Open jzstkarol opened 2 years ago

jzstkarol commented 2 years ago

image image 此处tap事件绑定成功,根据文档绑定的click事件未生效

ICMI commented 1 year ago

目前不支持click,可以在外部触发click,模拟tap事件,通过 emitEvent 接口传递进去,类似小程序的实现。示例: graph. emitEvent({ type: "tap", x: 0, // 相对于 canvas 标签左上角 y: 0, // 相对于 canvas 标签左上角 clientX: 0, clientY: 0, pageX: 0, pageY: 0, })