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

请问,我该如何判断某个节点是否被连线了? #3786

Closed
qq12157138 opened this issue Jul 17, 2023 · 3 comments
Closed

请问,我该如何判断某个节点是否被连线了? #3786

qq12157138 opened this issue Jul 17, 2023 · 3 comments

Comments

@qq12157138
Copy link

Describe the feature you'd like to request

需求:节点A、节点B,节点A连线了节点B,如果有连线节点B删除的时候要带着节点A一起删除。
效果:我删除节点B的时候如何知道节点B是否被连线了?连线的源头又是哪个?

Describe the solution you'd like

我删除节点B的时候如何知道节点B是否被连线了?连线的源头又是哪个?

Describe alternatives you've considered

看API好像没合适的方法。这个我从哪个方面去找呢

Your Example Website or App

No response

Screenshots or Videos

No response

@snail88
Copy link

snail88 commented Jul 18, 2023

https://x6.antv.antgroup.com/api/mvc/model#getoutgoingedges

@xingke55
Copy link

const edges = graph.model.getIncomingEdges(nodeB)
for(let edge of edges){
let source =edge.getSourceCell()

}

@x6-bot
Copy link
Contributor

x6-bot bot commented Jul 25, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants