@samatawy/diagrams
    Preparing search index...

    Interface DiagramEditContextMenu

    Defines the structure of a diagram edit context menu event, which extends the diagram background click event and includes information about the node(s) involved in the context menu interaction.

    interface DiagramEditContextMenu {
        canvas: IPoint;
        world: IPoint;
        event: PointerEvent;
        node?: INode;
        nodeId?: string;
        nodes: INode[];
        nodeIds: string[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    canvas: IPoint

    The coordinates of the click in canvas space, which represents the position of the click relative to the diagram's viewport.

    world: IPoint

    The coordinates of the click in world space, which represents the position of the click in the diagram's coordinate system, taking into account any transformations such as panning and zooming.

    event: PointerEvent

    The pointer event that triggered the context menu interaction. This property provides access to the original pointer event, allowing for more specific handling of the context menu interaction,

    node?: INode

    The node that is the target of the context menu interaction, if applicable. This property may be undefined if the context menu was triggered on the background or if the node information is not available.

    nodeId?: string

    The ID of the node that is the target of the context menu interaction, if applicable. This property may be undefined if the context menu was triggered on the background or if the node information is not available.

    nodes: INode[]

    The nodes that are involved in the context menu interaction, if applicable. This array may be empty if the context menu was triggered on the background or if the node information is not available.

    nodeIds: string[]

    The IDs of the nodes that are involved in the context menu interaction, if applicable. This array may be empty if the context menu was triggered on the background or if the node information is not available.