Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DiagramMaker<NodeType, EdgeType>

Top Level DiagramMaker Class. Instantiate to render a diagram maker instance within a container.

Type parameters

  • NodeType = {}

  • EdgeType = {}

Hierarchy

  • DiagramMaker

Index

Constructors

Properties

Methods

Constructors

  • Type parameters

    • NodeType = {}

    • EdgeType = {}

    Parameters

    Returns DiagramMaker<NodeType, EdgeType>

Properties

api: DiagramMakerApi<NodeType, EdgeType>

DiagramMaker APIs.

store: Store<DiagramMakerData<NodeType, EdgeType>, AnyAction>

DiagramMaker store. Currently used for dispatching, fetching state & listening to updates. Will be moved to API and closed out.

Methods

  • destroy(): void
  • API called to clean up a diagram maker instance after the user navigates away from the page or closes the workspace.

    This is used to clean up event handlers that diagram maker attaches to the container, so it could lead to a memory leak if its not called. This is because DOM & event listeners have a self loop so it never gets garbage collected automatically unless we remove the event listeners.

    Returns void

  • updateContainer(): void
  • API called to update diagram maker about container size changes. Should be called when the window resizes or panels outside of diagram maker opening up to cause changes to container size.

    This is used for several calculations, so dragging & other interactions might be broken if this API is not called appropriately.

    Returns void

Generated using TypeDoc