Open waxlamp opened 9 years ago
Fixing the first issue seems straightforward and I think we should fix that. The second is a bit more nuanced and I wonder whether we should support it. Suppose you have the triangle graph A,B,C. You expand C get its link to D, then expand D, which links to all other nodes. I feel that collapsing D should not be left with just D, but supporting issue 2 would do just that.
I propose that collapse a node A means "hide nodes that only connect to A".
I'm ok with this definition. I'll be sure to just resolve (1) above.
When collapsing a node, currently this means "hide all neighbors of the node that have degree 1" i.e., all neighbors that connect only to the target node. This has two problems:
The solution is to investigate who the neighbors of A's neighbors are, rather than examining their degree.