DragCreating tool to allow drawing rectangle on top of rectangle

I want to allow drawing a rectangle on top of rectangle in the following example. Currently if the checkbox is checked and while dragging on top of rectangle it starts moving it, I want to allow drawing on top of it.

Notice in the Drag Creating sample, Drag Creating Tool, the installation of the DragCreatingTool is done by modifying the ToolManager.mouseMoveTools list:

      myDiagram.toolManager.mouseMoveTools.insertAt(2,
        . . .);

Putting it at index 2 means that it comes after the LinkingTool and the DraggingTool in the ToolManager.mouseMoveTools list: ToolManager | GoJS API
In other words, that way the DragCreatingTool has lower priority than those two tools.

But you can easily have the DragCreatingTool have a higher priority than the DraggingTool by inserting it before the DraggingTool:

      myDiagram.toolManager.mouseMoveTools.insertAt(1,
        . . .);

That was quick! thanks a lot, working as expected :D

It’s about as easy as it gets.