Hide Links while dragging Node

Is there a way to hide the Links connected to a Node while the Node is being dragged?

When dragging a node, since I have routing AvoidNodes, it is not easy with all the lines to guess how will the diagram look after moving it.

Yes, you can override some functions of the DraggingTool.

function setDraggedLinkVisibility(tool, val) {
  var it = tool.draggedParts.iterator;
  while (it.next()) {
    var p = it.key;
    if (p instanceof go.Node) {
      var lit = p.linksConnected;
      while (lit.next()) {
        var l = lit.value;
        l.visible = val;
      }
    }
  }
}

myDiagram.toolManager.draggingTool.doActivate = function () {
  go.DraggingTool.prototype.doActivate.call(this);
  setDraggedLinkVisibility(this, false);
}

myDiagram.toolManager.draggingTool.doDeactivate = function () {
  setDraggedLinkVisibility(this, true);
  go.DraggingTool.prototype.doDeactivate.call(this);
}

You may or may not need a doCancel override. Depending on how much you want to customize the DraggingTool, it may be wise to create a custom DraggingTool. Read about extensions here.

Thanks so much for your prompt response, that method (setDraggedLinkVisibility) was doing weird things when dragging only the second or the second last node, it was working fine for the rest.

I did take your suggestion on doActivate and doDeactivate:
myDiagram.toolManager.draggingTool.doActivate = () => {
// call super
go.DraggingTool.prototype.doActivate.call(myDiagram.toolManager.draggingTool);
// hide links while dragging
this.exciseNode(myDiagram.selection.first());
};

    myDiagram.toolManager.draggingTool.doDeactivate = () => {
      // display the links again
      const node = myDiagram.selection.first();
      if (node !== null) {
        const linksOut = node.findLinksOutOf();
        // show LinksOutOf after dragging
        linksOut.each(link => {
          link.visible = true;
        });
      }
      // call super
      go.DraggingTool.prototype.doDeactivate.call(myDiagram.toolManager.draggingTool);
    };