antvis / XFlow

React component for building interactive diagrams.
https://x6.antv.antgroup.com/xflow/guide/introduction
MIT License
564 stars 233 forks source link

Fix highlight node related lines #391

Closed StrangeXin closed 12 months ago

StrangeXin commented 1 year ago

Description

修复问题:XFlowNodeCommands.HIGHLIGHT_NODE 高亮节点命令,isHighlightRelatedLines参数功能不正确

问题1:getEdges是获取全部边,应该改为getConnectedEdges

问题2:在allEdges.forEach里面执行HIGHLIGHT_EDGE,会导致只高亮最后一条边,因为HIGHLIGHT_EDGE命令一次只高亮一条边,并且会将其他边重置为非高亮

Motivation and Context

Types of changes

Self Check before Merge

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 2be488ceec74047f4a991447d24c33a1cf270301

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

StrangeXin commented 1 year ago

另外: 1、XFlowNodeCommands.HIGHLIGHT_NODE 高亮节点命令的isHighlightRelatedLines参数应该去除或增加一个options参数,用于改为getConnectedEdges后需要传额外的参数

image

这里感觉isHighlightRelatedLines很鸡肋 2、当我需要一次高亮很多个节点或者很多条指定的边,目前没有这样的命令,目前都是只能够传一个节点或边的id(更加不科学的地方:HIGHLIGHT_EDGE只高亮一条边,并且还会重置掉其他已经高亮的边,这也是上面Description“问题2”产生的原因),建议增加一个批量高亮节点或边的命令

xflow-bot[bot] commented 1 year ago

Hiya!

This PR has gone quiet. Spooky quiet. 👻

We get a lot of PRs, so we currently close PRs after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this PR or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this PR open!

Thanks for being a part of the AntV community! 💪💯

xflow-bot[bot] commented 12 months ago

Hey again!

It’s been 60 days since anything happened on this PR, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot 🤖, so if I’ve closed this PR in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this PR or create a new one if you need anything else.

Thanks again for being part of the AntV community! 💪💯