antvis/G2

V5 移除了事件 plot:contextmenu 吗 #6501

shiningstarts posted onGitHub

问题描述

https://g2.antv.antgroup.com/manual/extra-topics/event <img width="823" alt="image" src="https://github.com/user-attachments/assets/c677f829-1f44-41c9-bc8f-f9f88e90a25f">

重现链接

No response

重现步骤

No response

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response


好问题,两种方式可以解决:

  1. POINTER_DOWN + 判断事件中的 button = 2,就是右键
  2. 找到 html 中的 canvas dom,canvasEl..addEventListener('contextmenu', () => {}),相当于使用原生 html dom 的右键事件
posted by hustcc 6 months ago

Fund this Issue

$0.00
Funded

Pull requests