Some small problmes with subgraphs

  1. Create a group with a step and a link to another step. If you drag a step out of the subgraph then as you move the outside sep around the subgraph changes size (to include the link). Is there a good way of handling this scenario?
  2. Create a group with a step and a link to another step. Only add the steps to the group. Is there a good way of handling this scenario?
    These scenarios have arisen in testing my app with users doing “odd” things.

I’m not sure I understand what the problems are. Do they both involve whether a link is part of the subgraph or not?
The standard linking behavior will make sure that the link does belong to the subgraph if both of its nodes are. That way copying a subgraph will copy all of the links connecting child nodes.
This policy is implemented by GoView.CreateLink calling GoSubGraph.ReparentToCommonSubGraph, and by GoToolRelinking.DoRelink calling that method too. Perhaps your programmatic creation of links should be reparenting the link appropriately.
Or maybe you want to implement some other policy regarding what should own links.

Scenario 1
One node is in the subgraph - one node is not. Should the link be removed from the subgraph?
Scenario 2
A user selects 2 noes but not the link. Should the link be added to the subgraph?
I don’t mean that the current Go library should do it but whether it should be done programmatically?

Well, of course that depends on what structures and semantics you want for your application.
But as I outlined in my first reply, the standard behavior is to make sure that every link drawn by the linking tools follows the policy implemented by GoSubGraph.ReparentToCommonSubGraph. It is likely that your application will have the same needs. Hence for your scenario #1, I think the answer is yes; for #2, I think the answer is yes also. I hope I understood your scenarios correctly.

Thanks