Gojs doNoLink problem

As seen in the picture, the doNoLink event runs when the mouse cursor port is left away from the port.

No problem when left close.
pay attention to the mouse cursor

how do i fix this problem?

I do not understand what the problem is. If the user does not drag close enough to a valid target port, the link should not be drawn.

But you can increase the value of https://gojs.net/latest/api/symbols/LinkingBaseTool.html#portGravity