So currently, I use the locationObjectName property to handle keeping the nodes in line:
However, it also appears to be (I may also just have a port property wrong) overriding the portId’s I’m setting on those itemArrays, so that instead of the port being the itemArray, it’s the main shape:
As far as I can tell, everything should be set correctly.
There are portId bindings on the input/output array templates:
function getInputTemplate() {
return GO(go.Panel, "TableRow",
new go.Binding("portId", "id"),
{
....
There are link from and to port id properties on the model:
let model = GO(go.GraphLinksModel, {
nodeKeyProperty: "id",
nodeGroupKeyProperty: "parent",
linkFromPortIdProperty: "fromPort",
linkToPortIdProperty: "toPort",
nodeDataArray: nodes,
linkDataArray: links
});
myDiagram.model = model;
And the link data I’m adding has those properties set:
let linkData = {
from: output.part.data.id,
fromPortId: output.data.id,
to: input.part.data.id,
toPortId: input.data.id,
category: "links"
};
myDiagram.model.addLinkData(linkData);
But for some reason the links will only go to the central node. I assumed the locationObjectName to be the reason.
My goal is for those “temporary” orange links to link between the two itemArray panels.