interface IViewSettings {
    background: {
        gridDivision: number;
        gridSize: number;
        subGridVisibleThreshold: number;
    };
    contextMenu: {
        additionalItems: ContextMenuItem[];
        enabled: boolean;
    };
    displayValueOnHover: boolean;
    enableMinimap: boolean;
    nodes: {
        defaultWidth: number;
        maxWidth: number;
        minWidth: number;
        resizable: boolean;
        reverseY: boolean;
    };
    palette: {
        enabled: boolean;
    };
    sidebar: {
        enabled: boolean;
        resizable: boolean;
        width: number;
    };
    toolbar: {
        enabled: boolean;
    };
    useStraightConnections: boolean;
    zoomToFit: {
        paddingBottom: number;
        paddingLeft: number;
        paddingRight: number;
        paddingTop: number;
    };
}

Properties

background: {
    gridDivision: number;
    gridSize: number;
    subGridVisibleThreshold: number;
}

Background settings

contextMenu: {
    additionalItems: ContextMenuItem[];
    enabled: boolean;
}

Type declaration

  • additionalItems: ContextMenuItem[]
  • enabled: boolean

    Whether the context menu should be enabled

displayValueOnHover: boolean

Show interface value on port hover

enableMinimap: boolean

Show a minimap

nodes: {
    defaultWidth: number;
    maxWidth: number;
    minWidth: number;
    resizable: boolean;
    reverseY: boolean;
}

Node settings

Type declaration

  • defaultWidth: number

    Default width of a node

  • maxWidth: number

    Maximum width of a node

  • minWidth: number

    Minimum width of a node

  • resizable: boolean

    Whether users should be able to resize nodes

  • reverseY: boolean

    Inverts the order of inputs/outputs in nodes.

palette: {
    enabled: boolean;
}

Palette settings

Type declaration

  • enabled: boolean

    Whether the palette should be enabled

sidebar: {
    enabled: boolean;
    resizable: boolean;
    width: number;
}

Sidebar settings

Type declaration

  • enabled: boolean

    Whether the sidebar should be enabled

  • resizable: boolean

    Whether users should be able to resize the sidebar

  • width: number

    Width of the sidebar in pixels

toolbar: {
    enabled: boolean;
}

Toolbar settings

Type declaration

  • enabled: boolean

    Whether the toolbar should be enabled

useStraightConnections: boolean

Use straight connections instead of bezier curves

zoomToFit: {
    paddingBottom: number;
    paddingLeft: number;
    paddingRight: number;
    paddingTop: number;
}