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]: After changeData, the result of changing the edge state item.setState does not meet expectations #6701

Open
2 of 10 tasks
Cherry860 opened this issue Jan 7, 2025 · 0 comments
Labels
status: waiting for maintainer These issues have not yet been reviewed by a maintainer

Comments

@Cherry860
Copy link

Cherry860 commented Jan 7, 2025

Describe the bug / 问题描述

背景描述:
1、节点之间存在多对多的关系,相同线段会重合显示,视觉上进行了合并,但实际是有多条线段的
2、点击某个节点后,需要展开子节点,为了达到这一效果,点击节点后使用了changeData()
3、点击某个节点后,同时需要将节点链路进行高亮,使用item.setState改变状态实现。
问题现象:
点击节点后,部分高亮的线段没有置于最顶层,已经使用了item.toFront();
Snipaste_2025-01-07_20-01-48
定位过程:
1、去掉changeData() 后就正常显示了,但是要实现展开和收缩节点,必须要使用changeData
2、尝试添加 setTimeout(() => {实现高亮 }, 1000); 可以解决,那就是changeData异步的问题了,有什么好的解决方案吗

Reproduction link / 复现链接

No response

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

No response

G6 Version / G6 版本

Please select / 请选择

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他
@Cherry860 Cherry860 added the status: waiting for maintainer These issues have not yet been reviewed by a maintainer label Jan 7, 2025
@github-actions github-actions bot changed the title [Bug]: changeData后,改变edge状态item.setState结果不符合预期 [Bug]: After changeData, the result of changing the edge state item.setState does not meet expectations Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for maintainer These issues have not yet been reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant