Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: In v4, when there is a combo layout, the edge cannot be placed at the bottom layer #6807

Open
3 of 10 tasks
Deathyin opened this issue Feb 25, 2025 · 2 comments
Open
3 of 10 tasks
Labels

Comments

@Deathyin
Copy link

Describe the bug / 问题描述

Image
在v4版本包含combo的布局中,期望所有的边线均置于combo、node的底部,但实际上配置了goupByTypes: false,以及用了toFront、toBack等方法后也没有用。
但在v5中默认边线就在最底层,请问v4中有办法实现这个逻辑吗?

Reproduction link / 复现链接

https://g6-v4.antv.vision/examples/interaction/combo/#rect

Steps to Reproduce the Bug or Issue / 重现步骤

Image

使用官方示例即可复现,在graph配置中添加goupByTypes: false,将所有combo、node用item.toFront(),将edge用item.toBack()改变层级后也没法实现

Image

但是在v5版本中默认边线就是在最底层

Image

v5 demo链接:
https://g6.antv.antgroup.com/examples/behavior/combo/#basic

Version / 版本

4.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他
@Deathyin Deathyin added the waiting for maintainer Triage or intervention needed from a maintainer. label Feb 25, 2025
@github-actions github-actions bot changed the title [Bug]: v4版本中在有combo布局的情况下,边线无法置于最底层 [Bug]: In v4, when there is a combo layout, the edge cannot be placed at the bottom layer Feb 25, 2025
Copy link

在 G6 v4 版本中,您遇到了在包含 combo 布局的情况下,边线无法置于最底层的问题。您已经尝试了配置 groupByTypes: false 以及使用 toFronttoBack 方法,但仍未能实现预期效果。在 v5 版本中,边线默认就在最底层。

对于 v4 版本,您可以尝试以下方法来解决这个问题:

  1. 手动调整 zIndex: 尝试手动设置边的 zIndex 属性,使其低于节点和 combo 的 zIndex

  2. 自定义渲染顺序: 如果 zIndex 无法满足需求,可以考虑自定义渲染顺序。通过监听图的 afterrender 事件,手动调整 DOM 元素的顺序。

  3. 升级到 v5: 如果可能的话,考虑升级到 G6 v5 版本,因为它已经默认解决了这个问题。

如果以上方法仍然无法解决您的问题,建议查看 G6 的更新日志和文档,或者在社区中寻求帮助。

如果您需要进一步的帮助,请随时告知。

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@zhongyunWan zhongyunWan added v4 and removed waiting for maintainer Triage or intervention needed from a maintainer. labels Feb 28, 2025
@Deathyin
Copy link
Author

Deathyin commented Mar 3, 2025

@petercat-assistant 上述方法不生效,但又无法快速升级到v5版本,还有其他办法吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants