antvis/G6

Grid plugin bug? #4706

neolee6053 posted onGitHub

问题描述

image

有些线不见了?只在我的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


你的浏览器有缩放或者容器有缩放?

posted by Yanyan-Wang almost 2 years ago

你的浏览器有缩放或者容器有缩放?

default: [ { type: "zoom-canvas", enableOptimize: true },

有这个,就是放大放小几次后,就出现了。通常是zoom out 后才出现

posted by neolee6053 almost 2 years ago

感觉跟这个问题一样:https://github.com/antvis/G6/issues/4688

可以换成别的图片作为 grid 看看

posted by Yanyan-Wang almost 2 years ago

感觉跟这个问题一样:#4688

可以换成别的图片作为 grid 看看

哦。。原来如此。。将来 G6团队会修吗?

posted by neolee6053 almost 2 years ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests