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

Hierarchy

  • IBaklavaTapable
    • IBaklavaViewModel

Properties

clipboard: IClipboard
commandHandler: ICommandHandler
displayedGraph: Graph

Currently displayed graph

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

Type declaration

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

    Called whenever an interface is rendered

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

    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)