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 () {
  setDraggedLinkVisibility(this, false);

myDiagram.toolManager.draggingTool.doDeactivate = function () {
  setDraggedLinkVisibility(this, true);

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
// hide links while dragging

    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