Member Junction
    Preparing search index...

    Implements

    • AfterViewInit
    • OnDestroy
    • OnChanges
    Index

    Constructors

    Properties

    activeLayout: "schema-grid" | "dagre" = 'schema-grid'

    Active layout algorithm. Starts from config.layoutAlgorithm (default schema-grid) but can be toggled at runtime via setLayoutAlgorithm. Exposed so the chrome toggle + saved user state can drive it.

    activeSchemas: Set<string> | null = null

    Set of schema names the user has filtered IN. Null means "all".

    config: ERDConfig = {}
    diagramContextMenu: EventEmitter<ERDDiagramContextMenuEvent> = ...
    expandedNodeIds: Set<string> = ...

    Node IDs the user has clicked "+N more fields" on.

    focusDepth: number = 1
    focusNodeId: string | null = null
    headerTitle: string = 'Entity Relationship Diagram'
    highlightedNodeIds: string[] = []
    highlightSet: Set<string> | null = null

    Derived — the Set of IDs in the focus/hover neighbourhood (null when no highlight active).

    hoverNodeId: string | null = null

    Node currently being hovered (for highlight preview).

    isRefreshing: boolean = false
    layout: ErdLayout = ...

    Cached layout — recomputed when nodes, filter, search or expansion changes.

    layoutComplete: EventEmitter<void> = ...
    linkClick: EventEmitter<ERDLinkClickEvent> = ...
    linkContextMenu: EventEmitter<ERDLinkContextMenuEvent> = ...
    linkHover: EventEmitter<ERDLinkHoverEvent> = ...
    linkHoverEnd: EventEmitter<ERDLink> = ...
    nodeClick: EventEmitter<ERDNodeClickEvent> = ...
    nodeContextMenu: EventEmitter<ERDNodeContextMenuEvent> = ...
    nodeDeselected: EventEmitter<void> = ...
    nodeDoubleClick: EventEmitter<ERDNodeDoubleClickEvent> = ...
    nodeDragEnd: EventEmitter<ERDNodeDragEvent> = ...
    nodeDragStart: EventEmitter<ERDNodeDragEvent> = ...
    nodeHover: EventEmitter<ERDNodeHoverEvent> = ...
    nodeHoverEnd: EventEmitter<ERDNode> = ...
    nodes: ERDNode[] = []
    nodeSelected: EventEmitter<ERDNode> = ...
    panning: boolean = false
    readOnly: boolean = false
    refreshRequested: EventEmitter<void> = ...
    rootClass: true
    schemaChips: SchemaChip[] = []

    Derived schema summary for the chip row.

    searchQuery: string = ''

    Search query string.

    selectedEntity: ERDNode | null = null

    Derived — the single selected entity, if any.

    selectedNodeId: string | null = null
    showHeader: boolean = true
    stateChange: EventEmitter<ERDState> = ...
    totalCount: number = 0

    Derived — total entities in the input, before any filtering.

    transform: Transform = ...

    Current pan + zoom.

    visibleCount: number = 0

    Derived — number of entities currently visible.

    zoomChange: EventEmitter<ERDZoomEvent> = ...

    Accessors

    • get showEdgeLabels(): boolean

      Whether to render FK field labels along edges. Defaults to ON in both layouts — the zoom-gate (>=0.55x) keeps the labels off when the user is zoomed out far enough to see hundreds of entities, so "noise on dense views" isn't a real concern. Consumers can still force off via config.showRelationshipLabels: false.

      Returns boolean

    Methods

    • Pick a point along the edge polyline for a label and approximate its width. Returns null for self-loops (no good place to put text). Uses the longest horizontal segment when one exists; falls back to the segment midpoint otherwise.

      Parameters

      • edge: LaidOutEdge

      Returns { w: number; x: number; y: number } | null

    • A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

      Parameters

      • changes: { [propName: string]: SimpleChange<any> }

        The changed properties.

      Returns void

    • Mousedown anywhere on the SVG (background OR a node card). We arm a potential pan and attach window-level move/up listeners so the drag continues even if the cursor leaves the canvas (passes over the focus card, scrollbars, the chrome, etc.).

      The actual panning = true flip happens in the move handler once the cursor crosses DRAG_THRESHOLD — that way short clicks still register as clicks on cards (no accidental selection-toggle from a tiny mouse jitter).

      Parameters

      • e: MouseEvent

      Returns void

    • Switch between the schema-grid and dagre hierarchical layouts at runtime. Emits a state change so the consumer can persist the user's preference (via userStateChange on mj-erd-composite).

      Also clears the current focus/selection — switching layouts moves cards to entirely new positions, so the previously-selected entity would otherwise stay highlighted in a different spot with the side panel still open, which is jarring. A clean slate is better.

      Parameters

      • algo: "schema-grid" | "dagre"

      Returns void