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

使用toggleVisible方法实现展开/收起下游节点功能,设置节点的visible:true时,节点上相关联的边也会被设置为visible:true #4140

Open
TinaTianMi opened this issue Jan 8, 2024 · 2 comments
Labels
type: feature 新功能 Feature/enhancement requests

Comments

@TinaTianMi
Copy link

TinaTianMi commented Jan 8, 2024

问题描述

使用toggleVisible方法实现展开/收起下游节点功能,设置节点的visible:true时,节点上相关联的边也会被设置为visible:true。

重现链接

见重现步骤

重现步骤

问题重现视频:
https://github.com/antvis/X6/assets/24401313/aab65dcd-e57c-481b-8120-61c908ed1238

问题重现步骤描述:

  1. 收起「t10_3-3 节点」的下游节点,隐藏所有下游边,由于「下游节点 dim_pub_shop_label_info_da」也是「t2_3-1 节点」的下游节点,所以该节点没有隐藏
  2. 收起「t2_3-1 节点」的下游节点,隐藏所有下游边 和 下游节点
  3. 展开「t2_3-1 节点」的下游节点,此时不仅显示了「t2_3-1 节点」的所有下游节点 和 下游边,还将「t10_3-3 节点」与其「下游节点 dim_pub_shop_label_info_da」之间的边也显示出来了

问题原因:
查看源码发现 X6 内部在处理 隐藏/显示 node时,会同步变更node上所有的 输入边&输出边的visible,从而实现node 隐藏/显示 时node上所有的 输入边&输出边 也 隐藏/显示
image

预期行为

在 变更 node 的 visible 时,不影响 node上所有的 输入边&输出边 的 visible

平台

  • 操作系统: [macOS]
  • 网页浏览器: [Google Chrome]
  • X6 版本: [2.16.1]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Jan 8, 2024

👋 @TinaTianMi

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@NewByVector
Copy link
Contributor

可以在 toggleVisible 方法中增加一个配置,欢迎提 PR。

@NewByVector NewByVector added the type: feature 新功能 Feature/enhancement requests label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature 新功能 Feature/enhancement requests
Projects
None yet
Development

No branches or pull requests

2 participants