This sample demonstrates the DragCreatingTool, which replaces the standard DragSelectingTool. It is defined in its own file, as DragCreatingTool.js.
Press in the background and then drag to show the area to be occupied by the new node. The mouse-up event will add a copy of the DragCreatingTool.archetypeNodeData object, causing a new node to be created. The tool will assign its GraphObject.position and GraphObject.desiredSize.