Skip to content

Commit

Permalink
fix: πŸ› fix delete node connection not delete (#1167)
Browse files Browse the repository at this point in the history
Co-authored-by: ζ©™ζž— <[email protected]>
  • Loading branch information
BARMPlus and ζ©™ζž— authored Jul 14, 2021
1 parent e10bbd7 commit 2b0ab54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/x6-app-dag/src/pages/rx-models/experiment-graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ class ExperimentGraph extends GraphCore<BaseNode, BaseEdge> {
nextGraph.nodes = oldGraph.nodes.filter(
(node) => !nodes.includes(node.id.toString()),
)
nextGraph.links = oldGraph.links.filter(
(link) =>
!nodes.find((node) =>
[link.source.toString(), link.target.toString()].includes(node),
),
)
} else {
nextGraph.links = oldGraph.links.filter((link) => {
return !links.find((delLink) => {
Expand Down

0 comments on commit 2b0ab54

Please sign in to comment.