dagre-compound
Version:
A multi-level compound graph layout library based on dagre
23 lines (22 loc) • 1.03 kB
TypeScript
import { graphlib } from 'dagre';
import { SafeAny } from '../interfaces/any';
import { GroupNode, IGraphLabel, MetaEdge, MetaNode } from '../interfaces/graph';
import { HierarchyParams } from '../interfaces/hierarchy';
import { BaseNode, SlimGraph } from './graph';
export declare class Hierarchy {
graphOptions: IGraphLabel;
private readonly index;
root: MetaNode;
constructor(graphOptions?: IGraphLabel);
getNodeMap(): {
[nodeName: string]: GroupNode | BaseNode;
};
node(name: string): GroupNode | BaseNode;
setNode(name: SafeAny, node: GroupNode | BaseNode): void;
getBridgeGraph(nodeName: string): graphlib.Graph<GroupNode | BaseNode> | null;
getChildName(nodeName: string, descendantName: string): string;
getPredecessors(nodeName: string): MetaEdge[];
getSuccessors(nodeName: string): MetaEdge[];
getOneWayEdges(node: GroupNode | BaseNode, inEdges: boolean): MetaEdge[];
}
export declare function buildHierarchy(graph: SlimGraph, params: HierarchyParams): Hierarchy;