@joint/react
    Preparing search index...

    Interface ValidateConnectionParams

    Context handed to a ValidateConnection callback (and to the validate option of CanConnectOptions) while the user drags a link end. Describes both ends of the pending connection along with the paper and graph it lives in.

    interface ValidateConnectionParams {
        endType: LinkEnd;
        graph: Graph;
        paper: Paper;
        source: ConnectionEnd;
        target: ConnectionEnd;
    }
    Index

    Properties

    endType: LinkEnd

    Which end the user is dragging: 'source' or 'target'.

    graph: Graph

    The graph the link belongs to.

    paper: Paper

    The paper the link is being drawn on.

    The source end of the pending connection.

    Type Declaration

    One end (source or target) of a link: the cell it attaches to and the exact port or magnet within that cell. Shared by ValidateConnectionParams and emitted on link:connect / link:disconnect events, so validation and event payloads describe a connection the same way.

    • Readonlyid: ID

      ID of the cell this end attaches to.

    • Readonlymagnet: Element | null

      The SVG magnet node the end attaches to, or null when attaching to the cell's root.

    • Readonlymodel: Cell

      The cell model (element or link) this end attaches to.

    • Readonlyport: string | null

      ID of the port the end attaches to, or null when it attaches to the cell body.

    • Readonlyselector: string | null

      Value of the magnet's joint-selector attribute, or null when it has none.

    The target end of the pending connection.

    Type Declaration

    One end (source or target) of a link: the cell it attaches to and the exact port or magnet within that cell. Shared by ValidateConnectionParams and emitted on link:connect / link:disconnect events, so validation and event payloads describe a connection the same way.

    • Readonlyid: ID

      ID of the cell this end attaches to.

    • Readonlymagnet: Element | null

      The SVG magnet node the end attaches to, or null when attaching to the cell's root.

    • Readonlymodel: Cell

      The cell model (element or link) this end attaches to.

    • Readonlyport: string | null

      ID of the port the end attaches to, or null when it attaches to the cell body.

    • Readonlyselector: string | null

      Value of the magnet's joint-selector attribute, or null when it has none.