We’re getting there! So I’ve adjusted my label nodes as follows:
var T1 = diagram.findNodeForKey(key);
var T2 = diagram.findNodeForKey(mb);
var TPL1 = T1.findTreeParentLink();
var TPL2 = T2.findTreeParentLink();
var TLN1 = $g(go.Node);
TLN1.labeledLink = TPL1;
TLN1.segmentIndex = -2;
TLN1.segmentFraction = .5;
diagram.add(TLN1);
var TLN2 = $g(go.Node);
TLN2.labeledLink = TPL2;
TLN2.segmentIndex = -2;
TLN2.segmentFraction = .5;
diagram.add(TLN2);
var TL = $g(go.Link, {
isLayoutPositioned: false
}, $g(go.Shape, {
strokeWidth: 2,
stroke: "blue"
}));
TL.fromNode = TLN1;
TL.toNode = TLN2;
diagram.add(TL);
And adjusted my marriage links as follows:
myDiagram.linkTemplateMap.add("Marriage", // for marriage relationships
$g(go.Link, {
selectable: false,
isTreeLink: false
}, $g(go.Shape, {
strokeWidth: 2,
stroke: "red"
})));
Works great on non-married people. However…assigning a married person as a twin results in the following (marriage links are red, ident twin links are blue):