pivotick - v0.0.1
    Preparing search index...

    Class Node

    Represents a single node (vertex) in a graph.

    Index

    Constructors

    • Create a new Node instance.

      Parameters

      • id: string

        Unique identifier for the node

      • Optionaldata: NodeData

        Optional data payload associated with the node

      • Optionalstyle: Partial<NodeStyle>
      • domID: string = ...
      • children: Node[] = []

      Returns Node

    Methods

    • Returns number

    • Returns number

    • Returns SVGGElement | null

    • Returns boolean

    • Parameters

      • parentNode: Node
      • childrenDepth: number

      Returns void

    • Parameters

      Returns void

    • Parameters

      • radius: number

      Returns void

    • Parameters

      • radius: number

      Returns void

    • Update the node's data.

      Parameters

      Returns void

    • Update the node's data.

      Parameters

      Returns void

    • Convert node to a simple JSON object representation.

      Parameters

      • dataOnly: boolean = false

        default: false

      Returns Record<string, unknown>

    • Parameters

      • Optionalexpanded: boolean

      Returns void

    • Parameters

      • visible: boolean

      Returns void

    • Merge partial data into the current node data. Useful for updating only parts of the data.

      Parameters

      • partialData: Partial<NodeData>

        Partial data object to merge

      Returns void

    • Merge partial data into the current node data. Useful for updating only parts of the data.

      Parameters

      • partialStyle: Partial<NodeStyle>

        Partial data object to merge

      Returns void

    Properties

    children: Node[]
    childrenDepth: number
    defaultCircleRadius: number = 10
    domID: string
    expanded?: boolean
    frozen?: boolean
    fx?: number
    fy?: number
    id: string
    isChild: boolean

    True if this node is a child within a collapsed cluster

    isParent: boolean

    True if this node has child nodes

    parentNode?: Node

    Reference to the parent cluster node (if this node is a child)

    visible: boolean
    vx?: number
    vy?: number
    weight?: number
    x?: number
    y?: number