@cbun wrote:
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.
Posts: 2
Participants: 2
