pivotick - v2.0.1
    Preparing search index...

    Class Edge

    Represents an edge (connection) between two nodes in a graph.

    Index

    Accessors

    Constructors

    • Create a new Edge instance.

      Parameters

      • id: string

        Unique identifier for the edge

      • from: Node

        Source node

      • to: Node

        Target node

      • Optionaldata: EdgeData

        Optional data payload for the edge

      • Optionalstyle: Partial<EdgeFullStyle>

        Optional style for the edge

      • directed: boolean | null = null
      • OptionalsyntheticTerminalNode: Node

      Returns Edge

    Methods

    • Returns SVGGElement | null

    • The sources vouching for this edge — pivot ids, plus 'seed' for data that was here to begin with. Which pivot asserted a relationship is the load-bearing half of provenance, so edges carry it exactly as nodes do.

      Returns string[]

    • Whether source vouches for this edge. 'seed' is true for un-pivoted data.

      Parameters

      • source: string

      Returns boolean

    • Returns boolean

    • Switch this edge's layer on or off, re-deriving visible from the other reasons it may already be hidden for. Returns whether anything changed.

      Parameters

      • layerVisible: boolean

      Returns boolean

    • Convert edge to a simple JSON object representation.

      Returns Record<string, unknown>

    • Parameters

      • visible: boolean

      Returns void

    • Structured-cloneable payload for the simulation worker; endpoints reduced to ids, keeps directed. The style is stripped of functions — see Node.toSimulationDTO.

      Returns SimulationEdgeDTO

    • Merge partial data into the current edge data.

      Parameters

      • partialData: Partial<EdgeData>

        Partial data object to merge

      Returns void

    • Merge partial style into the current edge style. Useful for updating only parts of the style.

      Parameters

      Returns void

    Properties

    directed: boolean | null
    domID: string
    from: Node
    id: string
    isCrossCluster?: boolean

    True for the subclass of synthetic edges that stand in for a real edge whose both endpoints are children of different clusters. Unlike the external→cluster synthetic edges, these are resolved as a set (one per collapse state) by ClusterDrawer.resolveCrossClusterEdges rather than the per-node toggle.

    isSynthetic?: boolean

    True if this is a synthetic edge (placeholder for collapsed cluster child)

    layerVisible: boolean

    Whether this edge's layer is switched on. A veto over visible: every other reason an edge is hidden (endpoints filtered out, a collapsed cluster, a manual hide) is asserted through show / hide, and show cannot bring an edge back while its layer is off.

    representedEdges?: Edge[]

    For a cross-cluster stand-in: the real edges it speaks for. Stand-ins are deduped by node pair, so one can cover several relations of several kinds; it is filtered out only once every one of them is.

    syntheticSourceNode?: Node

    For a cross-cluster synthetic edge: the real child the from side stands in for.

    syntheticTerminalNode?: Node

    The actual child node this synthetic edge points to (for expansion logic)

    to: Node
    visible: boolean
    visibleIgnoringLayer: boolean

    What visible would be if every layer were on — i.e. visibility from the endpoint, collapse and manual reasons alone. The simulation gates on this rather than on visible, so switching a layer off never changes the layout.