@samatawy/diagrams
    Preparing search index...

    Class ElkLayout

    ElkLayout is a utility class that provides methods to automatically layout nodes using ELK. Currently experimental and calls only layered flow layouts.

    Index

    Constructors

    • Creates an instance of ElkLayout and attaches it to a DiagramView. This allows the ElkLayout to manipulate the viewport of the DiagramView when fitting content.

      Parameters

      • diagram: DiagramView

        the DiagramView instance to attach to

      Returns ElkLayout

    Methods

    • Automatically layout the diagram in a top-to-bottom flow.

      Parameters

      • direction: "UP" | "DOWN" | "LEFT" | "RIGHT"

      Returns Promise<INode[]>

    • Automatically layout the diagram in a top-to-bottom tree.

      Parameters

      • direction: "UP" | "DOWN" | "LEFT" | "RIGHT"

      Returns Promise<INode[]>

    • Automatically layout the diagram in a radial layout. N.B. Very poor results. To be evaluated before deployment.

      Returns Promise<INode[]>

    • Parameters

      • edge: any

      Returns ElkExtendedEdge | undefined