Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DiagramMakerApi<NodeType, EdgeType>

Type parameters

  • NodeType = {}

  • EdgeType = {}

Hierarchy

  • DiagramMakerApi

Index

Constructors

  • Type parameters

    • NodeType = {}

    • EdgeType = {}

    Parameters

    Returns DiagramMakerApi<NodeType, EdgeType>

Methods

  • dispatch(action: AnyAction): void
  • dispatch a action, for plugin use

    Parameters

    • action: AnyAction

    Returns void

  • fit(leftPanelWidth?: number, rightPanelWidth?: number, nodeKeys?: string[]): DiagramMakerApi<NodeType, EdgeType>
  • Zooms out & pans the workspace such that all nodes are visible in the screen.

    Parameters

    • Optional leftPanelWidth: number
    • Optional rightPanelWidth: number
    • Optional nodeKeys: string[]

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.
  • focusNode(nodeId: string, leftPanelWidth?: number, rightPanelWidth?: number): DiagramMakerApi<NodeType, EdgeType>
  • Moves the workspace around to center the node matching the passed ID. Also selects the corresponding node.

    Parameters

    • nodeId: string

      ID of the node to focus

    • Optional leftPanelWidth: number
    • Optional rightPanelWidth: number

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.
  • focusSelected(leftPanelWidth?: number, rightPanelWidth?: number): DiagramMakerApi<NodeType, EdgeType>
  • Moves the workspace around to center the selected node. If more than 1 nodes are selected, it falls back to fitting the selected nodes in. If no nodes are selected, this resets the zoom & centers the workspace.

    Parameters

    • Optional leftPanelWidth: number
    • Optional rightPanelWidth: number

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.
  • Arranges nodes according to the specified layout type.

    Parameters

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.

    NOTE FOR "WORKFLOW" LAYOUT: "Workflow" layout uses Dagre library underneath: https://github.com/dagrejs/dagre

    We don't bundle it with DiagramMaker, as not all consumers need this functionality. To use "Workflow" layout, you'll need to add Dagre library to your package.json.

  • Redo the last undone action.

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.
  • Resets the zoom to base level.

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.
  • Sets the editor to the given mode, in order to modify its UI behavior.

    Parameters

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.
  • Undo the last undoable action.

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.
  • Zooms in one level into the diagram maker workspace at the center.

    Parameters

    • zoom: number = DEFAULT_ZOOM_DELTA

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.
  • Zooms out one level into the diagram maker workspace at the center.

    Parameters

    • zoom: number = DEFAULT_ZOOM_DELTA

    Returns DiagramMakerApi<NodeType, EdgeType>

    • Returns this DiagramMakerApi instance for method chaining.

Generated using TypeDoc