Interface: Actions ​
Hierarchy ​
Omit
<ViewportHelper
,"viewportInitialized"
>↳
Actions
Table of contents ​
Properties ​
- $destroy
- $reset
- addEdges
- addNodes
- addSelectedEdges
- addSelectedElements
- addSelectedNodes
- applyEdgeChanges
- applyNodeChanges
- endConnection
- findEdge
- findNode
- fitBounds
- fitView
- flowToScreenCoordinate
- fromObject
- getConnectedEdges
- getIncomers
- getIntersectingNodes
- getOutgoers
- getViewport
- isNodeIntersecting
- panBy
- project
- removeEdges
- removeNodes
- removeSelectedEdges
- removeSelectedElements
- removeSelectedNodes
- screenToFlowCoordinate
- setCenter
- setEdges
- setElements
- setInteractive
- setMaxZoom
- setMinZoom
- setNodeExtent
- setNodes
- setPaneClickDistance
- setState
- setTranslateExtent
- setViewport
- startConnection
- toObject
- updateConnection
- updateEdge
- updateEdgeData
- updateNode
- updateNodeData
- updateNodeDimensions
- updateNodeInternals
- updateNodePositions
- viewportHelper
- zoomIn
- zoomOut
- zoomTo
Properties ​
$destroy ​
• $destroy: () => void
remove store instance from global storage and destroy it (will invalidate effect scopes)
Type declaration ​
â–¸ (): void
remove store instance from global storage and destroy it (will invalidate effect scopes)
Returns ​
void
$reset ​
• $reset: () => void
reset state to defaults
Type declaration ​
â–¸ (): void
reset state to defaults
Returns ​
void
addEdges ​
• addEdges: AddEdges
parses edges and adds to state
addNodes ​
• addNodes: AddNodes
parses nodes and adds to state
addSelectedEdges ​
• addSelectedEdges: (edges
: GraphEdge
[]) => void
manually select edges and add to state
Type declaration ​
â–¸ (edges
): void
manually select edges and add to state
Parameters ​
Name | Type |
---|---|
edges | GraphEdge [] |
Returns ​
void
addSelectedElements ​
• addSelectedElements: (elements
: FlowElements
) => void
manually select elements and add to state
Deprecated
will be removed in the next major, use Actions.addSelectedNodes or Actions.addSelectedEdges instead
Type declaration ​
â–¸ (elements
): void
manually select elements and add to state
Parameters ​
Name | Type |
---|---|
elements | FlowElements |
Returns ​
void
Deprecated
will be removed in the next major, use Actions.addSelectedNodes or Actions.addSelectedEdges instead
addSelectedNodes ​
• addSelectedNodes: (nodes
: GraphNode
<any
, any
, string
>[]) => void
manually select nodes and add to state
Type declaration ​
â–¸ (nodes
): void
manually select nodes and add to state
Parameters ​
Name | Type |
---|---|
nodes | GraphNode <any , any , string >[] |
Returns ​
void
applyEdgeChanges ​
• applyEdgeChanges: (changes
: EdgeChange
[]) => GraphEdge
[]
applies default edge change handler
Type declaration ​
â–¸ (changes
): GraphEdge
[]
applies default edge change handler
Parameters ​
Name | Type |
---|---|
changes | EdgeChange [] |
Returns ​
applyNodeChanges ​
• applyNodeChanges: (changes
: NodeChange
[]) => GraphNode
<any
, any
, string
>[]
applies default node change handler
Type declaration ​
â–¸ (changes
): GraphNode
<any
, any
, string
>[]
applies default node change handler
Parameters ​
Name | Type |
---|---|
changes | NodeChange [] |
Returns ​
GraphNode
<any
, any
, string
>[]
endConnection ​
• endConnection: (event?
: MouseEvent
| TouchEvent
, isClick?
: boolean
) => void
end (or cancel) a connection
Type declaration ​
â–¸ (event?
, isClick?
): void
end (or cancel) a connection
Parameters ​
Name | Type |
---|---|
event? | MouseEvent | TouchEvent |
isClick? | boolean |
Returns ​
void
findEdge ​
• findEdge: FindEdge
find an edge by id
findNode ​
• findNode: FindNode
find a node by id
fitBounds ​
• fitBounds: FitBounds
Inherited from ​
Omit.fitBounds
fitView ​
• fitView: FitView
Inherited from ​
Omit.fitView
flowToScreenCoordinate ​
• flowToScreenCoordinate: Project
Inherited from ​
Omit.flowToScreenCoordinate
fromObject ​
• fromObject: (obj
: FlowExportObject
) => Promise
<boolean
>
load graph from export obj
Type declaration ​
â–¸ (obj
): Promise
<boolean
>
load graph from export obj
Parameters ​
Name | Type |
---|---|
obj | FlowExportObject |
Returns ​
Promise
<boolean
>
getConnectedEdges ​
• getConnectedEdges: (nodesOrId
: string
| Node
<any
, any
, string
>[]) => GraphEdge
[]
get a node's connected edges
Type declaration ​
â–¸ (nodesOrId
): GraphEdge
[]
get a node's connected edges
Parameters ​
Name | Type |
---|---|
nodesOrId | string | Node <any , any , string >[] |
Returns ​
getIncomers ​
• getIncomers: (nodeOrId
: string
| Node
<any
, any
, string
>) => GraphNode
<any
, any
, string
>[]
get a node's incomers
Type declaration ​
â–¸ (nodeOrId
): GraphNode
<any
, any
, string
>[]
get a node's incomers
Parameters ​
Name | Type |
---|---|
nodeOrId | string | Node <any , any , string > |
Returns ​
GraphNode
<any
, any
, string
>[]
getIntersectingNodes ​
• getIntersectingNodes: GetIntersectingNodes
returns all node intersections
getOutgoers ​
• getOutgoers: (nodeOrId
: string
| Node
<any
, any
, string
>) => GraphNode
<any
, any
, string
>[]
get a node's outgoers
Type declaration ​
â–¸ (nodeOrId
): GraphNode
<any
, any
, string
>[]
get a node's outgoers
Parameters ​
Name | Type |
---|---|
nodeOrId | string | Node <any , any , string > |
Returns ​
GraphNode
<any
, any
, string
>[]
getViewport ​
• getViewport: GetViewport
Inherited from ​
Omit.getViewport
isNodeIntersecting ​
• isNodeIntersecting: IsNodeIntersecting
check if a node is intersecting with a defined area
panBy ​
• panBy: (delta
: XYPosition
) => Promise
<boolean
>
pan the viewport; return indicates if a transform has happened or not
Type declaration ​
â–¸ (delta
): Promise
<boolean
>
pan the viewport; return indicates if a transform has happened or not
Parameters ​
Name | Type |
---|---|
delta | XYPosition |
Returns ​
Promise
<boolean
>
project ​
• project: Project
Inherited from ​
Omit.project
removeEdges ​
• removeEdges: RemoveEdges
remove edges from state
removeNodes ​
• removeNodes: RemoveNodes
remove nodes (and possibly connected edges and children) from state
removeSelectedEdges ​
• removeSelectedEdges: (edges
: GraphEdge
[]) => void
manually unselect edges and remove from state
Type declaration ​
â–¸ (edges
): void
manually unselect edges and remove from state
Parameters ​
Name | Type |
---|---|
edges | GraphEdge [] |
Returns ​
void
removeSelectedElements ​
• removeSelectedElements: (elements?
: Elements
) => void
Deprecated
will be replaced in the next major unselect selected elements (if none are passed, all elements are unselected)
Type declaration ​
â–¸ (elements?
): void
Parameters ​
Name | Type |
---|---|
elements? | Elements |
Returns ​
void
Deprecated
will be replaced in the next major unselect selected elements (if none are passed, all elements are unselected)
removeSelectedNodes ​
• removeSelectedNodes: (nodes
: GraphNode
<any
, any
, string
>[]) => void
manually unselect nodes and remove from state
Type declaration ​
â–¸ (nodes
): void
manually unselect nodes and remove from state
Parameters ​
Name | Type |
---|---|
nodes | GraphNode <any , any , string >[] |
Returns ​
void
screenToFlowCoordinate ​
• screenToFlowCoordinate: Project
Inherited from ​
Omit.screenToFlowCoordinate
setCenter ​
• setCenter: SetCenter
Inherited from ​
Omit.setCenter
setEdges ​
• setEdges: SetEdges
parses edges and re-sets the state
setElements ​
• setElements: SetElements
parses elements (nodes + edges) and re-sets the state
setInteractive ​
• setInteractive: (isInteractive
: boolean
) => void
enable/disable node interaction (dragging, selecting etc)
Type declaration ​
â–¸ (isInteractive
): void
enable/disable node interaction (dragging, selecting etc)
Parameters ​
Name | Type |
---|---|
isInteractive | boolean |
Returns ​
void
setMaxZoom ​
• setMaxZoom: (zoom
: number
) => void
apply max zoom value to panzoom
Type declaration ​
â–¸ (zoom
): void
apply max zoom value to panzoom
Parameters ​
Name | Type |
---|---|
zoom | number |
Returns ​
void
setMinZoom ​
• setMinZoom: (zoom
: number
) => void
apply min zoom value to panzoom
Type declaration ​
â–¸ (zoom
): void
apply min zoom value to panzoom
Parameters ​
Name | Type |
---|---|
zoom | number |
Returns ​
void
setNodeExtent ​
• setNodeExtent: (nodeExtent
: CoordinateExtent
| CoordinateExtentRange
) => void
apply extent to nodes
Type declaration ​
â–¸ (nodeExtent
): void
apply extent to nodes
Parameters ​
Name | Type |
---|---|
nodeExtent | CoordinateExtent | CoordinateExtentRange |
Returns ​
void
setNodes ​
• setNodes: SetNodes
parses nodes and re-sets the state
setPaneClickDistance ​
• setPaneClickDistance: (distance
: number
) => void
Type declaration ​
â–¸ (distance
): void
Parameters ​
Name | Type |
---|---|
distance | number |
Returns ​
void
setState ​
• setState: SetState
set new state
setTranslateExtent ​
• setTranslateExtent: (translateExtent
: CoordinateExtent
) => void
apply translate extent to panzoom
Type declaration ​
â–¸ (translateExtent
): void
apply translate extent to panzoom
Parameters ​
Name | Type |
---|---|
translateExtent | CoordinateExtent |
Returns ​
void
setViewport ​
• setViewport: SetViewport
Inherited from ​
Omit.setViewport
startConnection ​
• startConnection: (startHandle
: ConnectingHandle
, position?
: XYPosition
, isClick?
: boolean
) => void
start a connection
Type declaration ​
â–¸ (startHandle
, position?
, isClick?
): void
start a connection
Parameters ​
Name | Type |
---|---|
startHandle | ConnectingHandle |
position? | XYPosition |
isClick? | boolean |
Returns ​
void
toObject ​
• toObject: () => FlowExportObject
return an object of graph values (elements, viewport transform) for storage and re-loading a graph
Type declaration ​
â–¸ (): FlowExportObject
return an object of graph values (elements, viewport transform) for storage and re-loading a graph
Returns ​
updateConnection ​
• updateConnection: (position
: XYPosition
, result?
: null
| ConnectingHandle
, status?
: null
| ConnectionStatus
) => void
update connection position
Type declaration ​
â–¸ (position
, result?
, status?
): void
update connection position
Parameters ​
Name | Type |
---|---|
position | XYPosition |
result? | null | ConnectingHandle |
status? | null | ConnectionStatus |
Returns ​
void
updateEdge ​
• updateEdge: UpdateEdge
updates an edge
updateEdgeData ​
• updateEdgeData: UpdateEdgeData
updates the data of an edge
updateNode ​
• updateNode: UpdateNode
updates a node
updateNodeData ​
• updateNodeData: UpdateNodeData
updates the data of a node
updateNodeDimensions ​
• updateNodeDimensions: UpdateNodeDimensions
internal dimensions' updater, you probably don't want to use this
updateNodeInternals ​
• updateNodeInternals: UpdateNodeInternals
force update node internal data, if handle bounds are incorrect, you might want to use this
updateNodePositions ​
• updateNodePositions: UpdateNodePosition
internal position updater, you probably don't want to use this
viewportHelper ​
• viewportHelper: ComputedRef
<ViewportHelper
>
viewport helper instance
zoomIn ​
• zoomIn: ZoomInOut
Inherited from ​
Omit.zoomIn
zoomOut ​
• zoomOut: ZoomInOut
Inherited from ​
Omit.zoomOut
zoomTo ​
• zoomTo: ZoomTo
Inherited from ​
Omit.zoomTo