Auto Layout

Let livediagram compute the layout for you from the connections between shapes.

Auto Layout is the structural tidier (the command palette calls it "Auto Layout (tidy up)"). Rather than nudging the positions you already have, it reads the arrow graph, works out how shapes connect, and computes brand-new positions, arranging connected shapes into clean layers. Unlike Auto-Align, it can legitimately move an element right across the canvas to give the diagram a proper layout.

1234Auto Layout1423
Auto Layout reads the arrow graph and re-lays a tangled diagram into clean, ordered layers.

What it does

  • It reads the arrow graph, splits it into connected groups, and lays out each group, using a layered arrangement for flow-like diagrams and breaking cycles where the graph loops back on itself.
  • It keeps connections readable: each shape settles beside the shapes it connects to, an arrow that skips a level gets its own lane instead of running through the shape in between, and arrows leave and arrive on the sides facing the flow.
  • It reads the way you drew it. The direction comes from your arrows: one that lands on the top of a shape runs down the flow, one that lands on its side runs across. Loops break where your drawing turns back, so a "Try again" arrow climbs back up rather than a step of the main path.
  • It draws flowcharts the flowchart way. When a decision has one answer drawn straight below it, that answer continues the column and the other answers step out beside the decision, level with it. A decision whose answers both sit below stays a tree, and a decision's answer to one side leaves by that side's point.
  • It works on the whole active tab. Shapes that aren't wired to anything (loose stickies, text, or images) pass through with their positions untouched, and spacing respects each element's size.
  • It keeps your shapes as you drew them: same sizes, same proportions.
  • It routes every arrow square and around the shapes: straight where two shapes line up, otherwise with right-angled bends through the gaps, and a loop runs back up outside the column it returns to. A dashed or dotted arrow is routed too, but it doesn't change where shapes go (a dotted-line report doesn't move anyone).
  • It keeps things together. A panel, group card or lane that holds connected shapes moves as one block with everything inside it, and a badge, chip or caption sitting on a shape moves with that shape.
  • It stays clear of everything else. The first shape of the flow stays where it is and the diagram grows from it, then steps clear of the title, key and anything else it doesn't move. Arrows route around those too.
  • It leaves locked elements where they are: a locked element, or anything on a locked layer, is not moved or resized, and the layout keeps clear of it. Unlock it first if you want it included.
  • It lands every shape's centre on the grid, so shapes that share a line keep sharing it, and a second press changes nothing.

Layout styles

One arrangement doesn't fit every diagram, so alongside the smart default there is a style for each shape of diagram, each a picture on the Tidy Up panel and a command in the palette. All of them read the same arrow graph and differ only in the shape of the result:

  • Auto Layout (tidy up) (the smart default): a layered arrangement with the direction inferred from where your shapes roughly sit now.
  • Auto Layout: Flowchart (down) and Auto Layout: Flowchart (right): the same layered arrangement, but with the direction forced top-to-bottom or left-to-right, whatever your current positions suggest.
  • Auto Layout: Tree: an org-chart arrangement. Roots sit at the top and every parent is centred over its own children, so hierarchies read cleanly level by level.
  • Auto Layout: Mindmap: a radial arrangement. The most-connected shape becomes the hub in the centre and its branches fan out around it, with each level on a wider ring.

If a diagram isn't a perfect tree (a shape with two parents), Tree still works: it lays out the main skeleton and reconnects the extra arrows across it. Mindmap is for ideas that branch out from a centre, so it isn't offered when your arrows loop back on themselves.

When a style isn't offered

Every style is tried before you see it, and one that wouldn't help is greyed out on the Tidy Up panel with the reason in place of its description:

  • Already tidy: it would change nothing.
  • Would cover a shape: it would put a shape on top of another one.
  • Would pull shapes out of their lanes or Would rearrange your lanes: your shapes sit in lanes or panels that would come apart. A swimlane keeps the lanes you built, so only Auto-Align is offered there.
  • For ideas that branch, not loop: Mindmap on a diagram with loops.

Run a style that isn't offered from the command palette and nothing moves; a short notice says why instead.

Running it

In Diagram mode, press the Tidy Up button in the bottom-right corner, just left of Layers.

Rest the mouse on a style to see the tab laid out that way, then click the one you want. From the command palette (⌘K / Ctrl+K), type Auto Layout and choose Auto Layout (tidy up) or one of the styles under Actions.

The whole tab is laid out anew in a single undoable step.
layoutEscACTIONSAuto Layout (tidy up)Auto Layout: Flowchart (down)Auto Layout: Flowchart (right)Auto Layout: TreeAuto Layout: MindmapHELPLayout Cleanup
Typing layout in the command palette lists Auto Layout and its styles under Actions.

Because it's one undoable operation, you can try a style and undo it in a single step (⌘Z / Ctrl+Z) if you preferred the previous arrangement, so it costs nothing to try two or three and keep the one that reads best.

When to use it

Reach for Auto Layout when a diagram has grown organically and lost its shape, or when shapes were placed without much thought and you want the connections to drive the layout. If the diagram already looks right and only needs its drift cleaned up, use Auto-Align instead.

Auto Layout needs edit access and leaves a locked tab alone, so unlock the tab first.

Auto Layout is deterministic and works offline, available in every deployment. It is separate from the AI Clean mode, which is optional and only exists where an AI provider is configured.

Was this article helpful?