Arrange a diagram automatically
The layout algorithms, and what undo does afterwards.
Open the command palette with Ctrl or Cmd and K, then choose Arrange diagram. Six algorithms are available: top to bottom, left to right, tree, radial, grid and compact.
Layout never runs on its own. It does not happen when you open, paste into or import a diagram — only when you ask. One arrange is one undo step that restores every previous position exactly.