Auto-Layout
The Auto-Layout tool automatically arranges nodes in your flow canvas using a hierarchical layout algorithm, making your flow easier to read and understand.
How It Works
Auto-Layout uses the dagre algorithm to calculate optimal positions for all nodes based on their connections. The algorithm:
- Analyzes node connections (edges)
- Determines the hierarchy of nodes
- Positions nodes to minimize edge crossings
- Maintains consistent spacing between nodes
Accessing Auto-Layout
Manual Trigger
Click the Auto-Layout button in the left panel (icon with vertical lines) to reorganize all nodes immediately.
Automatic Mode
Toggle the Auto Mode button (wand icon) to enable automatic layout:
- When enabled, nodes are automatically reorganized when changes are detected
- The system monitors for overlapping nodes and crossed edges
- Layout is applied automatically when issues are detected
Layout Direction
The default layout direction is Left-to-Right (LR), which means:
- START node appears on the left
- Flow progresses horizontally to the right
- END nodes appear on the right side
Spacing Configuration
The auto-layout uses the following default spacing:
| Parameter | Value | Description |
|---|---|---|
| Node Spacing | 100px | Vertical distance between nodes at the same level |
| Rank Spacing | 150px | Horizontal distance between hierarchy levels |
Special Handling
Notes Nodes
Sticky notes are handled separately from the main flow:
- Notes are positioned below the main flow area
- They don't affect the layout of connected nodes
Disconnected Nodes
Nodes without connections are positioned at the end of the layout, maintaining their relative positions.
When to Use Auto-Layout
Recommended scenarios:
- After adding multiple nodes quickly
- When importing a flow from another source
- When the canvas becomes cluttered
- After deleting nodes that cause layout gaps
Not recommended:
- If you've carefully positioned nodes manually
- When working with very large flows (may take time to compute)
Troubleshooting
Layout doesn't change
If the layout doesn't change after clicking Auto-Layout:
- Ensure there are connected nodes in the flow
- Check if Auto Mode is already active and has applied the layout
Nodes overlap after layout
This can happen with very complex flows. Try:
- Removing unnecessary connections
- Breaking the flow into smaller sections using Jump-To nodes