func DefaultRouter(ctx context.Context, graph *d2graph.Graph, edges []*d2graph.Edge) error
func ExtractSubgraph(container *d2graph.Object, includeSelf bool) (nestedGraph *d2graph.Graph, externalEdges []*d2graph.Edge, externalEdgeIDs []edgeIDs)
func FitToGraph(container *d2graph.Object, nestedGraph *d2graph.Graph, padding geo.Spacing)
func InjectNested(container *d2graph.Object, nestedGraph *d2graph.Graph, isRoot bool)
func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, coreLayout d2graph.LayoutGraph, edgeRouter d2graph.RouteEdges) error
func PositionNested(container *d2graph.Object, nestedGraph *d2graph.Graph)
func SaveChildrenOrder(container *d2graph.Object) (restoreOrder func())
func SaveOrder(g *d2graph.Graph) (restoreOrder func())
type DiagramType string
a grid diagram at a constant near is
const ( DefaultGraphType DiagramType = "" ConstantNearGraph DiagramType = "constant-near" GridDiagram DiagramType = "grid-diagram" SequenceDiagram DiagramType = "sequence-diagram" )
type GraphInfo struct { IsConstantNear bool DiagramType DiagramType }
func NestedGraphInfo(obj *d2graph.Object) (gi GraphInfo)
Name | Synopsis |
---|---|
.. | |
d2dagrelayout | |
d2elklayout | d2elklayout is a wrapper around the Javascript port of ELK. |
d2grid | |
d2layoutfeatures | |
d2near | d2near applies near keywords when they're constants Intended to be run as the last stage of layout after the diagram has already undergone layout |
d2sequence |