ChangingSelection event on LinkDrawn

Hi. I need to keep the existing selection when a link is drawn. From my research, it seems like the LinkingTool’s doMouseUp method raises a ChangingSelection event with the newly added link as the subject. I know I could override that method, but I don’t want to attempt to implement that entire method without the ChangingSelection logic. Is there a way to disable the selection change behavior of the LinkingTool without completely overriding the doMouseUp method? Thanks.

I think this will do what you are asking for:

      $(go.Diagram, . . .,
        { . . .,
          "linkingTool.doActivate": function() {
            this.diagram.allowSelect = false;
            go.LinkingTool.prototype.doActivate.call(this);
          },
          "linkingTool.doDeactivate": function() {
            go.LinkingTool.prototype.doDeactivate.call(this);
            this.diagram.allowSelect = true;
          },

That worked. Thanks Walter!