Having ports ignore location spot and location object?

As a follow up, is it possible to have a link/port ignore the locationObjectName property?

I need the behavior that has for the node itself (for linking, lining up layout, etc), but I still want links in the nondefault category to go directly to their ports, rather than being overridden.

I’m sorry, but could you please clarify with some small screenshots and explanation?

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.

No, the “location” properties/objects have nothing to do with ports and link routing.

You might find this documentation useful: https://gojs.net/latest/api/symbols/Node.html#findPort

Hmm, okay, I’ll take a look at that and debug my ports.

Thanks!