Diagram.selection is not working if I insert DragCreatingTool to mouseMoveTool

I have a requirement to select nodes by dragging mouse. For that I used DragCreatingTool and modified the insertPart to select nodes in the dragged area. In that case I am getting selected nodes in diagram.selection. But if I single click a node, I am not getting the selected node in diagram.selection. Am I doing something wrong. Please provide a solution.

It was my mistake sorry

In case anyone else reads this, there is already a standard DragSelectingTool that is installed and operational. However it does not start unless the user pauses briefly after the mouse-down before moving the mouse. This allows the PanningTool to run, which is the more common behavior for the same gesture, without the pause.

Control the delay time by setting DragSelectingTool | GoJS API