hover节点更新节点背景色,移动鼠标,节点的icon会出现闪动 #5375
yunahanlin posted onGitHub
问题描述
需求: hover/active时节点变化背景颜色 现象:hover节点背景色有变化,但是节点内的icon出现快速闪动现象。节点内的icon是通过drawShape的addShape的image添加 鼠标移入事件: //节点鼠标移入事件 graph.value.on('node:mouseover', (ev: IG6GraphEvent) => { const item: any = ev.item; const shape = ev.target; console.log('shape', shape); if (shape.cfg.name != 'shadowNode') { graph.value.setItemState( item, 'hover' + item._cfg.model.nodeType, true ); graph.value.clearItemStates( item, 'selected' + item._cfg.model.nodeType ); } });
重现链接
无
重现步骤
无
预期行为
期望:hover节点时icon不出现闪动
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.5.1 ... ]
屏幕截图或视频(可选)
https://github.com/antvis/G6/assets/20509449/4292ca4d-ffbb-4067-91f0-94aa653eb2f3
补充说明(可选)
No response