When a diagram gets messy, you usually want one of two things: either everything is nearly aligned and you just want the drift gone, or the layout never really happened and you want it computed for you. livediagram has a tool for each, grouped under a Cleanup section in the tab and canvas menu. They are complementary, not duplicates: one snaps the positions you already have, the other recomputes positions from how the diagram is wired together.
The two tools
- Auto-align is a grid snap. It rounds every element's position and size to a 10 px grid so near-aligned shapes become exactly aligned and small drift collapses. Nothing moves more than 5 px. See Auto-Align.
- Auto Layout ("tidy up" in the command palette) reads the arrow graph and computes brand-new positions, laying out connected shapes into clean layers, or into a style you pick: flowchart (down or right), tree, or mindmap. It can legitimately move an element across the canvas. See Auto Layout.
Auto-Align
Snap current positions to a tidy grid when things are just a few pixels off.
Auto Layout
Recompute the whole diagram's layout from the connections between shapes.
How to run them
Open the command palette (⌘K / Ctrl+K), type Auto Layout or Auto-align, and pick the tidier you want under Actions. Both run on the whole active tab as a single undoable step, so if the result isn't what you hoped, one undo puts everything back exactly as it was.
The tidiers are for editors: it isn't offered in a view-only session, and it leaves a locked tab alone, so unlock the tab first. Inside an unlocked tab, a locked element, or anything on a locked layer, stays exactly where it is.
The two tools compose nicely. Auto Layout finishes by running Auto-Align, so a freshly laid-out diagram is also grid-aligned. If you want, you can run Auto Layout to get the structure right, then trust it has already snapped to the grid for you.
Both tools work entirely offline and deterministically. They never call out to anything, so they're available in every deployment, including a self-hosted one.
Was this article helpful?