@samatawy/diagrams
    Preparing search index...

    Interface ISerializedNode

    Serialized representation of a node, suitable for JSON serialization. The 'owner' property is not serialized, and connection anchors are represented with their own serialized format.

    interface ISerializedNode {
        id: string;
        type: string;
        in_group?: string;
        points: IPoint[];
        text?: string;
        style_class?: string;
        textStyle?: TextStyle;
        strokeStyle?: StrokeStyle;
        fillStyle?: FillStyle;
        image?: ImageStyle;
        shadowStyle?: ShadowStyle;
        opacity?: number;
        angle?: number;
        geometry?: Record<string, string | number | boolean>;
        specific?: Record<string, unknown>;
        meta?: Record<string, unknown>;
        ready?: boolean;
        locked?: boolean;
        locked_aspect?: boolean;
        hollow?: boolean;
        invisible?: boolean;
        from?: ISerializedConnectionAnchor;
        to?: ISerializedConnectionAnchor;
    }

    Hierarchy

    • Omit<INode, "owner">
      • ISerializedNode
    Index

    Properties

    id: string

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

    type: string

    The type of the node, which can be used to determine how the node is rendered and interacted with.

    in_group?: string
    points: IPoint[]

    The points that define the geometry of the node, which can be used for rendering and for determining how connections attach to the node.

    text?: string

    The text content of the node, which can be displayed within the node's bounding box.

    style_class?: string

    The optional class name of the node, which can be used to apply specific styles or behaviors to the node based on its class.

    textStyle?: TextStyle

    The text style properties of the node, which can be used to control the appearance of the node's text, including font, size, color, alignment, and baseline.

    strokeStyle?: StrokeStyle

    The stroke style of the node, which can be used to control the color and pattern of the node's border.

    fillStyle?: FillStyle

    The fill style of the node, which can be used to control the color and pattern of the node's interior.

    image?: ImageStyle

    The image style of the node, which can be used to control the rendering of an image within the node.

    shadowStyle?: ShadowStyle

    The shadow style of the node, which can be used to apply a shadow effect to the node.

    opacity?: number

    The opacity of the node, from 0 (fully transparent) to 100 (fully opaque). Defaults to 100 when not set.

    angle?: number

    The rotation angle of the node, which can be used to rotate the node around its center.

    geometry?: Record<string, string | number | boolean>

    An optional geometry object that can store additional geometric properties of the node, such as width, height, or other custom measurements. This can be used to extend the node's geometry beyond the basic points and provide more detailed control over its shape and size. The geometry object is a key-value map where keys are property names and values can be numbers, strings, or booleans. This allows for flexible storage of various geometric attributes that may be relevant to the node's rendering or interaction.

    specific?: Record<string, unknown>

    An optional specific object that can store additional properties specific to the node's type, allowing for customization and extension of the node's functionality but not related to its geometry.

    meta?: Record<string, unknown>

    An optional metadata object for the node, which can be used to store additional information about the node. This can include custom properties, annotations, or any other relevant data that is not related to the node's appearance.

    ready?: boolean

    Indicates whether the node is ready to be rendered, which can be used to control the creation process and ensure that all necessary information is available before finalizing creation.

    locked?: boolean

    Indicates whether the node is locked, which can be used to prevent any modifications to the node's properties or geometry.

    locked_aspect?: boolean

    Indicates whether the node's aspect ratio is locked, which can be used to maintain the original proportions of the node when resizing.

    hollow?: boolean

    Indicates whether the whole area of the node is selectable or only its border.

    invisible?: boolean

    Indicates whether the node is invisible, which can be used to control the rendering style of the node.