Class Group

A group is an extension of node that can contain other nodes and groups.

Hierarchy (view full)

Methods

  • Adds a sub-graph to this vertex. If you provide an existing Graph instance that does not have an id, one will be assigned.

    Parameters

    • g: string | Graph

      Either a Graph instance, or the id you wish to assign to a new Graph.

    Returns Graph

    The Graph that was added.

  • Gets all the edges connecting to this group and any ports on the group.

    Parameters

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }
      • filter: ((e: Edge) => boolean)
          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

  • Gets all of the edges connected to this node, both on the node itself and on all of its ports.

    Parameters

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }

      Method parameters.

      • filter: ((e: Edge) => boolean)

        Optional Edge filter.

          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

  • Gets all of the Edges connected to this Node, both on the Node itself and on all of its Ports, where this node/port is the source of edge

    Returns Edge[]

  • Gets all of the Edges connected to this Node, both on the Node itself and on all of its Ports, where this node/port is the target of edge

    Returns Edge[]

  • Sets some attribute on the object.

    Parameters

    • key: string

    Returns string

  • Gets all Edges directly connected to this Vertex, ie. not to one of the Ports on the Vertex. This is an alias for getEdges.

    Parameters

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }

      Method parameters.

      • filter: ((e: Edge) => boolean)

        Optional Edge filter.

          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

  • Gets all Edges directly connected to this Vertex, ie. not to one of the Ports on the Vertex, where this Vertex is the source. This is an alias for getSourceEdges.

    Returns Edge[]

  • Gets all Edges directly connected to this Vertex, ie. not to one of the Ports on the Vertex, where this Vertex is the target. This is an alias for getTargetEdges.

    Returns Edge[]

  • Gets all edges where this vertex is either the source or the target of the edge. Note that this does not retrieve edges on any ports associated with this Vertex - for that,

    Parameters

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }
      • filter: ((e: Edge) => boolean)

        Optional function to test whether a given edge should be included.

          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

    List of matching edges.

    #getAllEdges.

  • Gets the Vertex's id, which, for Nodes and Groups, is just the id property. This method is overridden by Ports.

    Returns string

    Vertex id

  • Retrieves a sub-graph by id. *

    Parameters

    • id: string

    Returns Graph

    Sub-graph with the given id, null if not found.

  • Gets this Node's "indegree" centrality; a measure of how many other Nodes are connected to this Node as the target of some Edge.

    Returns number

  • Gets an "internal" Edge from one Port to another.

    Parameters

    • source: string | Port

      Source Port.

    • target: string | Port

      Target Port.

    Returns any

  • Gets all the edges to/from the group, any ports the Group has, and any edges connected to all child vertices of the group.

    Parameters

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }
      • filter: ((e: Edge) => boolean)
          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

  • Gets how many members the group has.

    Returns number

  • Gets the group members

    Returns Node[]

  • Gets this Node's "outdegree" centrality; a measure of how many other Nodes this Node is connected to as the source of some Edge.

    Returns number

  • Gets the Port with the given id, null if nothing found.

    Parameters

    • portId: string

      Port id.

    Returns Port

  • Gets all Edges that are connected to Ports on this Node, not directly to the Node itself.

    Parameters

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }
      • filter: ((e: Edge) => boolean)
          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

  • Gets all Ports associated with this Node.

    Returns Port[]

  • Gets all Edges that are connected to Ports on this Node, not directly to the Node itself, where the Port on this Node is the source of the edge.

    Returns Edge[]

  • Gets all Edges that are connected to Ports on this Node, not directly to the Node itself, where the Port on this Node is the target of the edge.

    Returns Edge[]

  • Returns a string representation of the Vertex. *

    Returns string

    Vertex dumped to a string.

  • Change the ID of some port.

    Parameters

    • port: Port
    • newId: string

    Returns boolean

  • Gets some attribute from the object.

    Parameters

    • key: string
    • value: string

    Returns void

  • Sets the default cost of travelling from one Port to another inside some Node. When a Node is created, this value is set to 1.

    Parameters

    • cost: number

      Default internal cost.

    Returns void

Properties

Underlying data for the object.

group: Group

Group the node is a member of, if any. This property should never be written by your code.

id: string

The vertex's id. A string.

members: Node[] = []

Members of the group. Do not write to, or manipulate in any way, this array.

transient?: boolean

Transient vertices are created at various points in the lifecycle of a renderer, such as dragging new edges, and are not exported in the dataset

type: string

Type of the object

Version :