I have a graph of components and relationships between them. User navigation with root component. He presses the extension button on the component to open a new component that is associated with the current component.
The problem is that the user decides to collapse the node. I have to select a hidden tree and at the same time leave the graph in a consistent state so that there is no extended node with a missing relation to another node graph.
Now in case of cyclic / loop between component, it is difficult for me to select subtree. For simplicity, I choose the order in which they were expanded. Therefore, if the A-extension in B and C compresses A, they hide the nodes and edges created by it. Now consider the following scenario.
[-] means an expanded state and [+] means it is not yet expanded. A expands to reveal B and C. And then B expands to reveal D. C expanded, which creates a connection between C and exits node D, and also creates node E. Now the user decides to collapse B. Since the extension order of D is child by B, he will hide and hide D. This leaves the graph in an inconsistent state, since C has an edge to D, but D no longer exists, if I delete the edge of the CD, it will still be inconsistent. If I compress C. And E again, a circular reference, for example in A, produces the same problem.
/
A[-] D[+]
\
\
E[+]
, , . , , node , .