Based on this sample: https://gojs.net/latest/samples/dynamicPorts.html, I just add one line "resizable: true," in myDiagram.nodeTemplate part. after that, as soon as I resize one node size by mouse, the ports' positions around this nodes change incorrectly and become messy. How could I fix this issue? I really need your help! thanks!
If you read about the ResizingTool, GoJS Tools -- Northwoods Software, you will see that you do not want to resize the whole node, but just the body. So give that Panel a GraphObject.name and assign Part.resizeObjectName.
Thanks, walter! the problem is fixed!