Loading and Saving
Canvas data is stored through WorkflowDocument
Canvas Data
Basic Document Structure:
- nodes
arrayList of nodes, supports nesting - edges
arrayList of edges
Basic Node Structure:
- id:
stringUnique node identifier, must be unique - meta:
objectNode UI configuration information, such aspositioninformation for free layout - type:
string | numberNode type, corresponds totypeinnodeRegistries - data:
objectNode form data, customizable by business - blocks:
arrayNode branches, usingblockis closer toGramming, currently stores nodes of sub-canvas - edges:
arrayEdge data of sub-canvas
Basic Edge Structure:
- sourceNodeID:
stringStarting node id - targetNodeID:
stringTarget node id - sourcePortID?:
string | numberStarting port id, defaults to the default port of the starting node if omitted - targetPortID?:
string | numberTarget port id, defaults to the default port of the target node if omitted
initial-data.ts
Loading
- Load through initialData
- Dynamic loading through ref
- Dynamic reload of all data (will produce redo/undo/onContentChange)
- Batch add nodes and lines