antvis/G6



The issue has been closed
contextmenu-shouldbegin #5059
GitHub-Wyatt posted onGitHub
问题描述
点击shouldbegin=false的节点上,上一次出现的菜单没有关闭
重现链接
https://g6.antv.antgroup.com/zh/examples/tool/contextMenu/#contextMenu
重现步骤
调整示例: shouldBegin(evt) { const {item} = evt; const model = item.getModel(); if (model.id === 'node1') { return true; } return false; }, 1、点击shouldbegin=true的节点上,正确出现菜单 2、点击shouldbegin=false的节点上,步骤1的菜单没有消失
预期行为
新的点击行为,之前的菜单会消失
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.8.23]
屏幕截图或视频(可选)
补充说明(可选)
No response