Class GraphShapeBuilder<Builder>

Type Parameters

Constructors

Properties

graph: GraphShape<any, any>
graphBuilder: Builder
previousNodes: GraphNode<any, any>[]
shapes: Map<string, ((...args) => GraphNode<any, any>)> = ...

Type declaration

    • (...args): GraphNode<any, any>
    • Parameters

      • Rest ...args: any[]

      Returns GraphNode<any, any>

Methods

  • Convert positions of all objects from a certain reference space

    Parameters

    • referenceSpace: string | ReferenceSpace

      Reference space to convert from

    Returns this

    Current graph shape builder

  • Convert positions of all objects to a certain reference space

    Parameters

    Returns this

    Current graph shape builder

  • Filter frames based on function

    Parameters

    • filterFn: ((frame) => boolean)

      Filter function (true to keep, false to remove)

        • (frame): boolean
        • Parameters

          Returns boolean

    Returns this

    Current graph builder instance

  • Filter objects inside frames

    Parameters

    • filterFn: ((object, frame?) => boolean)

      Filter function (true to keep, false to remove)

    Returns this

    Current graph builder instance

  • Merge objects

    Parameters

    • by: ((frame) => boolean) = ...

      Merge key

        • (frame): boolean
        • Parameters

          Returns boolean

    • timeout: number = 100

      Timeout

    • timeoutUnit: TimeUnit = TimeUnit.MILLISECOND

      Timeout unit

    Returns this

    Current graph shape builder

  • Parameters

    • key: string
    • fn: ((...args) => GraphNode<any, any>)
        • (...args): GraphNode<any, any>
        • Parameters

          • Rest ...args: any[]

          Returns GraphNode<any, any>

    Returns void