Relinking and linking don't work with custom ports on one and same node

Both Linking and Relinking tool works correctly when the link will connect different nodes, but never on one and the same node.
They both do not highlight the ports when they start from the same node.
This image is correct, the different nodes are recognized with their ports:


and here is when the node is one and the same, there is no highlights on the ports, nothing happens when I click

unless I overide “doNoLink”


But the ports are not highlighted. I cannot relink to another port in this node, only to the other nodes. They are not visible and the tools cannot find them, so I had to implement at hand determination of ports logic.

The main part of the node template is:

$gojs(go.Node, “Auto”, {

        fromLinkable: true,
        fromLinkableSelfNode: true,
        fromLinkableDuplicates: true,
        toLinkable: true,
        toLinkableSelfNode: true,
        toLinkableDuplicates: true,

The template has custom ports, made using one of your examples. Do I need to override some methods of the tools, so they work as it must?

Walter, please help.

Those from… and to… properties need to be set on each port, not on the whole Node.

1 Like