|
|
@@ -68,6 +68,27 @@ export interface LayoutOptions {
|
|
|
getFollowNode?: GetFollowNode;
|
|
|
}
|
|
|
|
|
|
+export interface LayoutConfig {
|
|
|
+ /** Direction for rank nodes. Can be TB, BT, LR, or RL, where T = top, B = bottom, L = left, and R = right. */
|
|
|
+ rankdir: 'TB' | 'BT' | 'LR' | 'RL';
|
|
|
+ /** Alignment for rank nodes. Can be UL, UR, DL, or DR, where U = up, D = down, L = left, and R = right. */
|
|
|
+ align: 'UL' | 'UR' | 'DL' | 'DR' | undefined;
|
|
|
+ /** Number of pixels that separate nodes horizontally in the layout. */
|
|
|
+ nodesep: number;
|
|
|
+ /** Number of pixels that separate edges horizontally in the layout. */
|
|
|
+ edgesep: number;
|
|
|
+ /** Number of pixels that separate edges horizontally in the layout. */
|
|
|
+ ranksep: number;
|
|
|
+ /** Number of pixels to use as a margin around the left and right of the graph. */
|
|
|
+ marginx: number;
|
|
|
+ /** Number of pixels to use as a margin around the top and bottom of the graph. */
|
|
|
+ marginy: number;
|
|
|
+ /** If set to greedy, uses a greedy heuristic for finding a feedback arc set for a graph. A feedback arc set is a set of edges that can be removed to make a graph acyclic. */
|
|
|
+ acyclicer: 'greedy' | undefined;
|
|
|
+ /** Type of algorithm to assigns a rank to each node in the input graph. Possible values: network-simplex, tight-tree or longest-path */
|
|
|
+ ranker: 'network-simplex' | 'tight-tree' | 'longest-path';
|
|
|
+}
|
|
|
+
|
|
|
export type GetFollowNode = (
|
|
|
node: LayoutNode,
|
|
|
context: {
|