Find the connected Link from port

I’m trying to customize the doMouseUp function on PortShiftingTool in order to relocate the link end relative to the port location, as soon as the port is moved.
When i stop (break point) on doMouseUp function i have the port object in my hand.
How can find its connected link ?

The literal answer to your question is to call Node | GoJS API.

But I would modify the behavior of PortShiftingTool.prototype.updateAlignment in so that you modify the fromSpot and toSpot during tje drag, not just upon the mouse up event.