Grid plugin bug? #4706
neolee6053 posted onGitHub
问题描述
有些线不见了?只在我的program有这样的问题。codesandbox上没有。有人遇见过类似的问题吗? 其中一个我想到的原因可能是我更改了z-index。因为不知道什么原因,我的grid会因为z-index = -1而看不见。可能是angular + ngZorro tab 的关系。
我不得已的做了以下修改
//Fix for z-index for grid this.linkViewInstance?.on("beforerender", (e: IG6GraphEvent) => { const children = Array.from(this.linkView?.nativeElement?.children); children.forEach(c => { if (c.className === '.g6-grid-container') { (c as HTMLElement).style.zIndex = '1'; } else { (c as HTMLElement).style.zIndex = '2'; } }); this.minimap.nativeElement.style.zIndex = '2'; const canvas = this.linkView?.nativeElement?.querySelector('canvas') as HTMLElement; if (canvas) { canvas.style.position = "relative"; } });
重现链接
如上
重现步骤
如上
预期行为
如上
平台
- 操作系统: [ Windows.]
- 网页浏览器: [Firefox]
- G6 版本: [4.8.15 ]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response