Positionable Ports at Subgraph

Is it possible to have ports at a subgraph, which can be repositioned by the user, for example by drag&drop of a port?

Or would you recommend to use GoBasicNodes instead?

I have the following use case:

There are subgraphs / container nodes which are connected with other subgraphs. These connections should be drawn as links.
In each subgraph from one end point of such a link there can be connections to one or more nodes of the subgraph.

I can imagine, this connection pattern is not very special …

Kind regards,
JJ

Just a short addition:
These ports /connection end points should be located at/near the border of the subgraph.
It would be perfect, if the user can fix their location or free it, so that they could be repositioned during layout.

Look at the SubGraph App sample, create a “MultiPort SubGraph” sample, then click “Add Port”.



Sort of like that, only with ports that can be dragged around the edge?

Yes, it should be similar to MultiPortSubgraph, which I inspected before I posted this topic. But I found no idea how to make the ports positionable.

For my purposes some of the features of MultiportSubgraph are even not necessary: the different shapes of ports, the undo extensions.

Linking from these ports by drag&drop is also not necessary; instead moving the ports along the border via drag&drop would be perfect.

OK… now look at NodeLinkDemo. The Insert menu has a “Node with movable ports” choice. Once you insert that node, you can pick “Edit > Port Mover” to enable the tool that moves ports.



If you want to change the PortMovingTool to start on the mouse-down of one of these special ports, you could do that by adding a CanStart and making it a MouseDown tool. (this will keep you from using the port to start a link, but it sounds like that is ok with you).



MultiPortSubgraph will need some rework to remove the auto layout of ports and allow positioning them explicitly, but it all looks doable.