Class: NodesStore
Constructors
constructor
• new NodesStore(rootStore
)
Parameters
Name | Type |
---|---|
rootStore | RootStore |
Accessors
nodes
• get
nodes(): ReadonlyMap
<string
, NodeState
>
Returns
ReadonlyMap
<string
, NodeState
>
Methods
addNode
▸ addNode(node
, rewriteIfExists?
): SuccessOrErrorResult
<NodeState
, INodeState
>
Parameters
Name | Type | Default value |
---|---|---|
node | INodeState | undefined |
rewriteIfExists | boolean | false |
Returns
SuccessOrErrorResult
<NodeState
, INodeState
>
addNodes
▸ addNodes(nodes
, rewriteIfExists?
): SuccessOrErrorResult
<NodeState
, INodeState
>[]
Parameters
Name | Type | Default value |
---|---|---|
nodes | INodeState [] | undefined |
rewriteIfExists | boolean | false |
Returns
SuccessOrErrorResult
<NodeState
, INodeState
>[]
export
▸ export(): INodeExport
[]
Returns
getNode
▸ getNode(nodeId
): undefined
| NodeState
Parameters
Name | Type |
---|---|
nodeId | string |
Returns
undefined
| NodeState
getNodesBoundingBox
▸ getNodesBoundingBox(): BoundingBox
Returns
Values are calculated without zoom taking into account, that is, the same as zoom would be '1'
import
▸ import(newNodes?
): void
Parameters
Name | Type |
---|---|
newNodes? | INodeState [] |
Returns
void
removeNode
▸ removeNode(nodeId
): undefined
| INodeExport
Parameters
Name | Type |
---|---|
nodeId | string |
Returns
undefined
| INodeExport
removeNodes
▸ removeNodes(nodeIds
): SuccessOrErrorResult
<INodeExport
, string
>[]
Parameters
Name | Type |
---|---|
nodeIds | string [] |
Returns
SuccessOrErrorResult
<INodeExport
, string
>[]