@samatawy/diagrams
    Preparing search index...

    Interface DiagramViewLike

    Partial DiagramView contract.

    interface DiagramViewLike {
        render_mode: "edit" | "view";
        animations: DiagramAnimations;
        getCache(): ViewCache;
        getCoordinates(): CoordinateSystem;
        id: string;
        nodes: INode[];
        groups?: IGroup[];
        layers: ILayer[];
        sheet_id?: string;
        background?: FillStyle;
        meta?: Record<string, unknown>;
        grid?: IGrid;
        node(id: string): INode | undefined;
        write(serializer: ISerializer): any;
        read(json: any, serializer: ISerializer): Promise<DiagramViewLike>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    render_mode: "edit" | "view"
    animations: DiagramAnimations
    id: string

    The unique identifier of the diagram, which is used to reference the diagram within the application and for serialization purposes.

    nodes: INode[]

    An array of nodes that belong to the diagram, which represent the entities and elements that can be connected and manipulated within the diagram.

    groups?: IGroup[]

    An optional array of groups that belong to the diagram, which can be used to organize nodes into visual collections. Grouped nodes maintain their relative positions.

    layers: ILayer[]

    An array of layers that belong to the diagram, which can be used to organize nodes into different visual layers.

    sheet_id?: string

    An optional identifier for the sheet associated with the diagram, which can be used to apply specific styles and configurations to the diagram's nodes and connections.

    background?: FillStyle

    An optional background fill style for the diagram, which can be used to set the background color or gradient of the diagram area.

    meta?: Record<string, unknown>

    An optional metadata object for the diagram, which can be used to store additional information about the diagram that is not part of its core structure. This can include custom properties, annotations, or any other relevant data that is not related to diagram rendering.

    grid?: IGrid

    An optional grid configuration for the diagram, which defines the properties of the grid used for aligning and snapping nodes.

    Methods