Arrow of link to collapsed subgraph

There is 2 subgraphs in Demo1
If you add links between internal nodes how it is shown in figure:
and then click on "minus"-handle of "test subgraph 2" to collapse the second subgraph, as here:
we'll see that arrows settle down incorrectly (under collapsed object)
Position of link is correct in case of when "star" is iconic node:
How to achieve such arrangement of link for subgraph?

I’ll investigate this.

Basically one needs to override the JGoPort methods that determine where and in what direction links need to terminate at the port, when the port is part of a node that is not visible because it is inside a collapsed subgraph.

I sort of have this working, but it still isn't as good as it should be because there are inconsistent conditions during the call to JGoSubGraph.collapse(). I'll try to spend more time on this whenever I get a chance.

Oh, and I should have originally mentioned that another solution strategy is to override collapse() and expand() to reconnect external links to/from the JGoSubGraph’s Port. You just have to consider links that are not children of the subgraph, and you have to remember the originally connected port, so that on expand you can relink them properly.