SVGnet API Documentation - v0.4.1
    Preparing search index...

    Interface LayoutStrategy<T>

    Interface for pluggable layout algorithms. The default is ForceDirectedLayout (wraps PhysicsEngine). Implement this to provide tree, radial, grid, or other layouts.

    interface LayoutStrategy<T extends NodeData = NodeData> {
        tick(
            nodes: Map<string, Node<T>>,
            links: PhysicsLink<T>[],
            filteredNodes: null | Set<string>,
        ): SimulationMetrics;
        isStable(metrics: SimulationMetrics): boolean;
        updateConfig(config: Partial<PhysicsConfig>): void;
        getConfig(): PhysicsConfig;
    }

    Type Parameters

    Implemented by

    Index

    Methods