Skip to content

NodeFactory

Classes

NodeFactory

Implements

Constructors

new NodeFactory()
new NodeFactory(params): NodeFactory
Parameters

params

params.accumulating?

params.accumulating.active

params.accumulating.destroy

params.area?: AreaPlugin<Schemes, AreaExtra>

params.arrange?: AutoArrangePlugin<Schemes, never>

params.comment?: CommentPlugin<Schemes, AreaExtra>

params.editor: NodeEditor

params.history?: HistoryPlugin<Schemes>

params.makutuClasses?: MakutuClassRepository

params.xmlSchemas?: Record<string, undefined | XmlSchema>

Returns

NodeFactory

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:508

Properties

arrange?
optional arrange: AutoArrangePlugin<Schemes, never>;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:449

codeIntegration
codeIntegration: CodeIntegration;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:506

comment
comment: undefined | CommentPlugin<Schemes, AreaExtra>;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:452

components
components: BaseComponent<ComponentSupportInterface>[] = [];
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:94

connectionPathType
readonly connectionPathType: Writable<"curve" | "monotone" | "linear" | "step">;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:132

connectionPlugin?
optional connectionPlugin: ConnectionPlugin;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:451

dataflowCache
dataflowCache: SvelteMap<Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>, Record<string, unknown>>;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:817

dataflowEngine
readonly dataflowEngine: DataflowEngine<Schemes>;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:438

editor
editor: NodeEditor;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:140

effetRootCleanup
effetRootCleanup: undefined | () => void;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:264

history
history: undefined | HistoryPlugin<Schemes>;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:450

id
id: string;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:149

lastAddedNode?
optional lastAddedNode: Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:181

lastSearchNodeIndex
lastSearchNodeIndex: number = -1;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:761

lastSelectedNode
lastSelectedNode: undefined | Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:139

layout
layout: NodeLayout;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:504

makutuClasses?
readonly optional makutuClasses: MakutuClassRepository;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:436

minimapEnabled
minimapEnabled: boolean;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:103

modalStore
modalStore: Readable<Modal>;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:145

notifications
notifications: NotificationsManager;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:104

pythonDataflowEngine
readonly pythonDataflowEngine: PythonDataflowEngine<Schemes>;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:211

reactivateDataflowTimeout
reactivateDataflowTimeout: null | Timeout = null;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:459

search: NodeSearch;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:446

selector
selector: NodeSelection;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:441

surfaceRect
surfaceRect: Rect;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:137

transform
transform: object;
zoom
zoom: number = 1;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:418

Accessors

area
get area(): undefined | AreaPlugin<Schemes, AreaExtra>
set area(area): void
Parameters

area: undefined | AreaPlugin<Schemes, AreaExtra>

Returns

undefined | AreaPlugin<Schemes, AreaExtra>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:415

connections
get connections(): Connection<Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>, Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>>[]

Connections in the editor.

Returns

Connection<Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>, Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>>[]

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:470

nodes
get nodes(): Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>[]

Nodes in the editor.

Returns

Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>[]

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:464

previewedNodes
get previewedNodes(): SvelteSet<Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>>
Returns

SvelteSet<Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:141

selection
get selection(): NodeSelection
Returns

NodeSelection

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:442

storage
get storage(): NodeStorage
Returns

NodeStorage

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:207

xmlSchemas
get xmlSchemas(): SvelteMap<string, XmlSchema>
Returns

SvelteMap<string, XmlSchema>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:455

Methods

addComponentByClass()
addComponentByClass<P, C>(componentClass, params): C
Type Parameters

P extends Record<string, unknown>

C extends BaseComponent<ComponentSupportInterface>

Parameters

componentClass

params: Omit<P, "owner">

Returns

C

Implementation of

ComponentSupportInterface.addComponentByClass

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:95

addNode()
addNode<T, Params>(nodeClass, params): Promise<T>
Type Parameters

T extends Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>

Params = Record<string, unknown>

Parameters

nodeClass

params: WithoutFactory<Params> = ...

Returns

Promise<T>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:182

addNodes()
addNodes(nodes): Promise<void>
Parameters

nodes: (Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>> | NodeSaveData)[]

Returns

Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:193

bulkOperation()
bulkOperation(callback): Promise<void>

Executes callback without running dataflow engines.

It is useful to execute multiple operations without unnecessarily running dataflow engines.

Parameters

callback

Callback to execute

Returns

Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:479

centerView()
centerView(nodes?): undefined | Promise<void>

Moves the view to the center of the nodes, with a zoom such that all nodes are visible.

Parameters

nodes?: Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>[]

Nodes to center the view on. If not provided, all nodes are used.

Returns

undefined | Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:286

clear()
clear(): Promise<void>

Removes all nodes and connections from the editor.

Returns

Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:498

commentSelectedNodes()
commentSelectedNodes(params): void
Parameters

params = {}

params.text?: string

Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:603

create()
create<T>(type): T
Type Parameters

T extends Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>

Parameters

type

Returns

T

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:712

deleteSelectedElements()
deleteSelectedElements(): Promise<void>

Delete all selected elements

Returns

Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:619

destroy()
destroy(): void
Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:273

destroyArea()
destroyArea(): void
Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:269

disable()
disable(): void
Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:704

downloadGraph()
downloadGraph(): void
Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:735

enable()
enable(): void
Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:700

findNode()
findNode(query): undefined | Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>

Finds a node whose label or name matches the query. Repeated calls will cycle through the nodes.

Parameters

query: string

Returns

undefined | Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>

found node or undefined

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:768

focusNode()
focusNode(node?): void
Parameters

node?: Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>

Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:785

focusNodes()
focusNodes(nodes?, options?): void
Parameters

nodes?: Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>[]

options?: Params = {}

Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:792

getArea()
getArea(): undefined | AreaPlugin<Schemes, AreaExtra>
Returns

undefined | AreaPlugin<Schemes, AreaExtra>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:724

getControlFlowEngine()
getControlFlowEngine(): ControlFlowEngine<Schemes>
Returns

ControlFlowEngine<Schemes>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:720

getEditor()
getEditor(): NodeEditor
Returns

NodeEditor

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:716

getNode()
getNode(id): undefined | Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>
Parameters

id: string

Returns

undefined | Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:708

getNodes()
getNodes(): Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>[]
Returns

Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>[]

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:203

getState()
getState<T>(
id,
key,
initial?): T
Type Parameters

T

Parameters

id: string

key: string

initial?: T

Returns

T

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:171

loadFromFile()
loadFromFile(): void
Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:739

loadGraph()
loadGraph(editorSaveData): Promise<void>

Loads a graph from a save.

Parameters

editorSaveData

Save data to load.

editorSaveData.comments: object[] = ...

editorSaveData.connections: ConnectionSaveData[] = ...

editorSaveData.editorName: string = ...

editorSaveData.graphName: string = ...

editorSaveData.id: undefined | string = ...

editorSaveData.nodes: NodeSaveData[] = ...

editorSaveData.previewedNodes: string[] = ...

editorSaveData.variables: Record<string, Variable> | Variable[] = ...

Returns

Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:340

loadNode()
loadNode(nodeSaveData): Promise<Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>>
Parameters

nodeSaveData: NodeSaveData

Returns

Promise<Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:213

openGraphForm()
openGraphForm(defaultName): Promise<void>
Parameters

defaultName: string = 'New Graph'

Returns

Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:291

removeNode()
removeNode(target): Promise<void>

Removes a node from the editor, as well as its connections.

Parameters

target: string | Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>

node or node id

Returns

Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:682

resetDataflow()
resetDataflow(node?): Promise<void>
Parameters

node?: Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>

Returns

Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:849

resetSuccessors()
resetSuccessors(node): void
Parameters

node: Node<Record<string, Socket<SocketType, "scalar" | "array">>, object, object, Record<string, unknown>, Record<string, unknown>>

Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:728

runDataflowEngines()
runDataflowEngines(): Promise<void>
Returns

Promise<void>

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:819

select()
select(entity, options): void
Parameters

entity: SelectorEntity

options: undefined | object = {}

Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:796

selectAll()
selectAll(): void
Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:809

selectConnection()
selectConnection(id): void
Parameters

id: string

Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:800

setState()
setState(
id,
key,
value): void
Parameters

id: string

key: string

value: unknown

Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:177

unselectAll()
unselectAll(): void
Returns

void

Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:813

useState()
useState<T>(
id,
key,
value?): object
Type Parameters

T = unknown

Parameters

id: string

key: string

value?: T

Returns

object

get()
get: () => T;
Returns

T

set()
set: (value) => void;
Parameters

value: T

Returns

void

value
value: T;
Defined in

tmp/graph-editor/src/lib/graph-editor/editor/NodeFactory.svelte.ts:151