How can I create a new node when I drag a link as soon as I release my mouse?

Hi, thank you for your hard work, I have some problems when using ‘gojs’.
I found that when I drag a link from a node which already in canvas, I must drag it onto another node, otherwise the link will disappear when I release my mouse. How can I create a new node when I drag a link as soon as I release my mouse, and make the new node just at the place where the ‘mouse up’, and also make the link link-to the new node automatically?
Thank you !

I think you might be interested in this sample: Page Not Found -- Northwoods Software

As with almost all of our samples, the complete source code is in the page itself – perform a View Page Source command in your browser.

The basic idea is to override the LinkingTool.doNoLink method. That sample, when no link is made, shows a context menu that allows the user to choose to create a node right there along with a link to it. You could adapt the code so that the doNoLink override just creates the node and link immediately, without showing showing information and some buttons.
LinkingTool | GoJS API