clear method
void
clear()
Removes all Parts from the Diagram, including unbound Parts except for the background grid, and also clears out the Model and UndoManager and clipboard. This operation is not undoable.
Alternative actions are to replace the #model with a new Model (probably a GraphLinksModel or a TreeModel), or to set Model#nodeDataArray with an empty JavaScript Array (and GraphLinksModel#linkDataArray).
This does not remove any listeners from the diagram.
Implementation
void clear() {
_i4.callMethod(
this,
'clear',
[],
);
}