Genogram: relative positioning after sorting

I’ve tried multiple ways to enforce ordering in complex genograms (e.g. presorting nodes / marriages), and the only solution I’ve found that works is to delete and re-add vertexes in the sorted order before the assignLayers step:

    var allv = new go.Set().addAll(net.vertexes);
    var vertexList = new go.List();
    allv.each(function(mv) {
      if (mv.node == null) return;
      vertexList.add(mv);
      net.deleteVertex(mv);
    });
    vertexList.sort(familySort);
    vertexList.each(function(vertex){
      net.addVertex(vertex);
    });

While the relative ordering of the nodes are correct, this seems to negate the optimal positioning of the nodes w.r.t optimal link lengths. Is there a way to “hint” positioning of nodes in a way to retain order? Example shows how the ordering is correct, but nodes become left aligned.

Not really. LayeredDigraphLayout is supposed to re-order the nodes in a layer in order to reduce the number of link crossings, so trying to prevent it from doing so can be counterproductive. The GenogramLayout already does so in order to put spouses near to each other, but that in itself can have some undesirable side-effects.

Ultimately I hope I get the time to completely reimplement GenogramLayout to work better. Until that time there probably isn’t much that can be done. Sorry.