The main model class for BaklavaJS

Implements

  • IBaklavaEventEmitter
  • IBaklavaTapable

Constructors

Properties

connectionEvents: {
    destruct: BaklavaEvent<void, Connection>;
} & ISubscribableProxy<{
    destruct: BaklavaEvent<void, Connection>;
}> = ...

Type declaration

events: {
    addGraphTemplate: BaklavaEvent<GraphTemplate, Editor>;
    beforeAddGraphTemplate: PreventableBaklavaEvent<GraphTemplate, Editor>;
    beforeRegisterNodeType: PreventableBaklavaEvent<IAddNodeTypeEventData, Editor>;
    beforeRemoveGraphTemplate: PreventableBaklavaEvent<GraphTemplate, Editor>;
    beforeUnregisterNodeType: PreventableBaklavaEvent<string, Editor>;
    loaded: BaklavaEvent<void, Editor>;
    registerGraph: BaklavaEvent<Graph, Editor>;
    registerNodeType: BaklavaEvent<IAddNodeTypeEventData, Editor>;
    removeGraphTemplate: BaklavaEvent<GraphTemplate, Editor>;
    unregisterGraph: BaklavaEvent<Graph, Editor>;
    unregisterNodeType: BaklavaEvent<string, Editor>;
} = ...

Type declaration

graphEvents: {
    addConnection: BaklavaEvent<IConnection, Graph>;
    addNode: BaklavaEvent<AbstractNode, Graph>;
    beforeAddConnection: PreventableBaklavaEvent<IAddConnectionEventData, Graph>;
    beforeAddNode: PreventableBaklavaEvent<AbstractNode, Graph>;
    beforeRemoveConnection: PreventableBaklavaEvent<IConnection, Graph>;
    beforeRemoveNode: PreventableBaklavaEvent<AbstractNode, Graph>;
    checkConnection: PreventableBaklavaEvent<IAddConnectionEventData, Graph>;
    removeConnection: BaklavaEvent<IConnection, Graph>;
    removeNode: BaklavaEvent<AbstractNode, Graph>;
} & ISubscribableProxy<{
    addConnection: BaklavaEvent<IConnection, Graph>;
    addNode: BaklavaEvent<AbstractNode, Graph>;
    beforeAddConnection: PreventableBaklavaEvent<IAddConnectionEventData, Graph>;
    beforeAddNode: PreventableBaklavaEvent<AbstractNode, Graph>;
    beforeRemoveConnection: PreventableBaklavaEvent<IConnection, Graph>;
    beforeRemoveNode: PreventableBaklavaEvent<AbstractNode, Graph>;
    checkConnection: PreventableBaklavaEvent<IAddConnectionEventData, Graph>;
    removeConnection: BaklavaEvent<IConnection, Graph>;
    removeNode: BaklavaEvent<AbstractNode, Graph>;
}> = ...

Type declaration

graphHooks: {
    checkConnection: ParallelHook<IAddConnectionEventData, CheckConnectionHookResult, Graph>;
    load: SequentialHook<IGraphState, Graph, IGraphState>;
    save: SequentialHook<IGraphState, Graph, IGraphState>;
} & ISubscribableProxy<{
    checkConnection: ParallelHook<IAddConnectionEventData, CheckConnectionHookResult, Graph>;
    load: SequentialHook<IGraphState, Graph, IGraphState>;
    save: SequentialHook<IGraphState, Graph, IGraphState>;
}> = ...

Type declaration

graphTemplateEvents: {
    nameChanged: BaklavaEvent<string, GraphTemplate>;
    updated: BaklavaEvent<void, GraphTemplate>;
} & ISubscribableProxy<{
    nameChanged: BaklavaEvent<string, GraphTemplate>;
    updated: BaklavaEvent<void, GraphTemplate>;
}> = ...

Type declaration

graphTemplateHooks: {
    afterSave: SequentialHook<IGraphTemplateState, GraphTemplate, IGraphTemplateState>;
    beforeLoad: SequentialHook<IGraphTemplateState, GraphTemplate, IGraphTemplateState>;
} & ISubscribableProxy<{
    afterSave: SequentialHook<IGraphTemplateState, GraphTemplate, IGraphTemplateState>;
    beforeLoad: SequentialHook<IGraphTemplateState, GraphTemplate, IGraphTemplateState>;
}> = ...

Type declaration

hooks: {
    load: SequentialHook<IEditorState, Editor, IEditorState>;
    save: SequentialHook<IEditorState, Editor, IEditorState>;
} = ...

Type declaration

nodeEvents: {
    addInput: BaklavaEvent<NodeInterface<any>, AbstractNode>;
    addOutput: BaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeAddInput: PreventableBaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeAddOutput: PreventableBaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeRemoveInput: PreventableBaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeRemoveOutput: PreventableBaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeTitleChanged: PreventableBaklavaEvent<string, AbstractNode>;
    loaded: BaklavaEvent<AbstractNode, AbstractNode>;
    removeInput: BaklavaEvent<NodeInterface<any>, AbstractNode>;
    removeOutput: BaklavaEvent<NodeInterface<any>, AbstractNode>;
    titleChanged: BaklavaEvent<string, AbstractNode>;
    update: BaklavaEvent<null | INodeUpdateEventData, AbstractNode>;
} & ISubscribableProxy<{
    addInput: BaklavaEvent<NodeInterface<any>, AbstractNode>;
    addOutput: BaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeAddInput: PreventableBaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeAddOutput: PreventableBaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeRemoveInput: PreventableBaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeRemoveOutput: PreventableBaklavaEvent<NodeInterface<any>, AbstractNode>;
    beforeTitleChanged: PreventableBaklavaEvent<string, AbstractNode>;
    loaded: BaklavaEvent<AbstractNode, AbstractNode>;
    removeInput: BaklavaEvent<NodeInterface<any>, AbstractNode>;
    removeOutput: BaklavaEvent<NodeInterface<any>, AbstractNode>;
    titleChanged: BaklavaEvent<string, AbstractNode>;
    update: BaklavaEvent<null | INodeUpdateEventData, AbstractNode>;
}> = ...

Type declaration

nodeHooks: {
    afterSave: SequentialHook<INodeState<any, any>, AbstractNode, INodeState<any, any>>;
    beforeLoad: SequentialHook<INodeState<any, any>, AbstractNode, INodeState<any, any>>;
} & ISubscribableProxy<{
    afterSave: SequentialHook<INodeState<any, any>, AbstractNode, INodeState<any, any>>;
    beforeLoad: SequentialHook<INodeState<any, any>, AbstractNode, INodeState<any, any>>;
}> = ...

Type declaration

Accessors

  • get loading(): boolean
  • Whether the editor is currently in the process of loading a saved graph

    Returns boolean

Methods

  • Load a state

    Parameters

    Returns string[]

    An array of warnings that occured during loading. If the array is empty, the state was successfully loaded.

  • Unregister an existing node type. Will also remove all the nodes of this type in all graphs.

    Parameters

    Returns void