Link are connected wrongly

Link are not responsively connected.
Please check the image

I want like the following image

It is happening when node is rotating.

how I can do this?

I think the issue is with port.

        panel.column = 0;
        panel.row = 0;
        panel.alignment = go.Spot.Left;
        port.alignment = go.Spot.Left;
        port.alignmentFocus = go.Spot.Left;

Is it better if you do not set the fromSpot or the toSpot?

I have not set fromSpot & toSpot in node template.

Is the “TCBA [159]” text part of the node? It isn’t rotated. Is the port an element inside a rotated panel?

Text is not rotating, image & port are rotating.

And you really want the port to rotate along with the image? I could not see what it is that you want. Normally in this case, such as with GoJS Ports in Nodes-- Northwoods Software or Dynamic Ports, you want links to connect with the rotated port, revolved about the icon, at its new angle.

when I not rotation, Move the node to other places then also this happen.


You have to make sure the fromSpot and the toSpot of each small port is the appropriate value so that the links come out and go into the port in a reasonable direction. Then rotating the whole Node or a Panel holding the port will cause links to continue connecting at the same but rotated point but at different angles.

See for example the Dynamic Ports sample. Select a Node and then rotate it by setting its angle in the debugger:

myDiagram.selection.first().angle = 90