Documentation ¶
Index ¶
Constants ¶
View Source
const ( CONTAINER_PADDING = 60 HORIZONTAL_PAD = 40. VERTICAL_PAD = 40. )
Variables ¶
This section is empty.
Functions ¶
func Layout ¶
func Layout(ctx context.Context, g *d2graph.Graph, layout d2graph.LayoutGraph) d2graph.LayoutGraph
Layout runs the grid layout on containers with rows/columns Note: children are not allowed edges or descendants
1. Traverse graph from root, skip objects with no rows/columns 2. Construct a grid with the container children 3. Remove the children from the main graph 4. Run grid layout 5. Set the resulting dimensions to the main graph shape 6. Run core layouts (without grid children) 7. Put grid children back in correct location
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.