How to stop it auto change the linkport?

While Changed the node position ,the link port may auto changing too,so,how can stop it?

It appears that your Node has four small circular ports positioned at the middles of the sides, just as the FlowChart nodes do. Each Link identifies which port it connects with via the Link.fromPortId and Link.toPortId. Those properties come from the link data object when the GraphLinksModel.html.linkFromPortIdProperty and GraphLinksModel.html.linkToPortIdProperty properties have been set to the property names of the link data.

Read GoJS Ports in Nodes-- Northwoods Software, about general ports, and look carefully at how the model is initialized in the FlowChart sample. Not only are those two properties set on the GraphLinksModel, but each link data has both port id properties set as well.

Thank you! It works

model.linkFromPortIdProperty = “fromPort”; // necessary to remember portIds
model.linkToPortIdProperty = “toPort”;

If link port is not connected…how to display error message