I want to catch drawing link event before the drawing has finished

i want to catch drawing link event before the drawing has finished.
And how to cancel drawing link event?

That depends on when and how often you want to do something. In general you will want to override LinkingTool methods. Perhaps override http://gojs.net/latest/api/symbols/LinkingTool.html#insertLink ?

To cancel the operation of any tool, call Tool.doCancel() on the Diagram.currentTool.

ok.i will try to override LinkingTool.

I have anothor question : When I edit node data ,the model data will update,but the page displaying won’t update.

I have used makeTwoWay method binding to ‘text’.

i have solved . use node.updateTargetBindings() method

@walter insertLink need to return a Link. Can you help me revise my code .

myDiagram.toolManager.linkingTool.insertLink=function(fromnode, fromport, tonode, toport){
return new $go.Link(){

In overriding LinkingTool.insertLink I was expecting that you would call the base method, perhaps modifying LinkingTool.archetypeLinkData first, and then return what it returns.

It is impractical to create a Link that works well being a data bound and modeled. It is much easier either calling the base method or calling GraphLinksModel.copyLinkData and GraphLinksModel.addLinkData.