Reference - BaklavaJS
    Preparing search index...

    Interface IBaklavaViewModel

    interface IBaklavaViewModel {
        clipboard: IClipboard;
        commandHandler: ICommandHandler;
        displayedGraph: Graph;
        editor: Editor;
        history: IHistory;
        hooks: {
            renderInterface: SequentialHook<
                { el: HTMLElement; intf: NodeInterface<any> },
                null,
            >;
            renderNode: SequentialHook<{ el: HTMLElement; node: AbstractNode }, null>;
        };
        isSubgraph: Readonly<boolean>;
        settings: IViewSettings;
        switchGraph: (newGraph: Graph | GraphTemplate) => void;
    }

    Hierarchy

    • IBaklavaTapable
      • IBaklavaViewModel
    Index

    Properties

    clipboard: IClipboard
    commandHandler: ICommandHandler
    displayedGraph: Graph

    Currently displayed graph

    editor: Editor
    history: IHistory
    hooks: {
        renderInterface: SequentialHook<
            { el: HTMLElement; intf: NodeInterface<any> },
            null,
        >;
        renderNode: SequentialHook<{ el: HTMLElement; node: AbstractNode }, null>;
    }

    Type declaration

    • renderInterface: SequentialHook<{ el: HTMLElement; intf: NodeInterface<any> }, null>

      Called whenever an interface is rendered

    • renderNode: SequentialHook<{ el: HTMLElement; node: AbstractNode }, null>

      Called whenever a node is rendered

    isSubgraph: Readonly<boolean>

    True if the currently displayed graph is a subgraph, false if it is the root graph

    settings: IViewSettings
    switchGraph: (newGraph: Graph | GraphTemplate) => void