Interface: Actions ​
Hierarchy ​
↳
Actions
Table of contents ​
Properties ​
- $destroy
- $reset
- addEdges
- addNodes
- addSelectedEdges
- addSelectedElements
- addSelectedNodes
- applyEdgeChanges
- applyNodeChanges
- endConnection
- findEdge
- findNode
- fitBounds
- fitView
- fromObject
- getConnectedEdges
- getIncomers
- getIntersectingNodes
- getOutgoers
- getTransform
- getViewport
- isNodeIntersecting
- panBy
- project
- removeEdges
- removeNodes
- removeSelectedEdges
- removeSelectedElements
- removeSelectedNodes
- setCenter
- setEdges
- setElements
- setInteractive
- setMaxZoom
- setMinZoom
- setNodeExtent
- setNodes
- setState
- setTransform
- setTranslateExtent
- setViewport
- startConnection
- toObject
- updateConnection
- updateEdge
- updateNodeDimensions
- updateNodeInternals
- updateNodePositions
- zoomIn
- zoomOut
- zoomTo
Properties ​
$destroy ​
• $destroy: () => void
Type declaration ​
â–¸ (): void
remove store instance from global storage and destroy it (will invalidate effect scopes)
Returns ​
void
$reset ​
• $reset: () => void
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
<any
, any
, string
>[]) => void
Type declaration ​
â–¸ (edges
): void
manually select edges and add to state
Parameters ​
Name | Type |
---|---|
edges | GraphEdge <any , any , string >[] |
Returns ​
void
addSelectedElements ​
• addSelectedElements: (elements
: FlowElements
<any
, any
, any
, any
>) => void
Type declaration ​
â–¸ (elements
): void
manually select elements and add to state
Parameters ​
Name | Type |
---|---|
elements | FlowElements <any , any , any , any > |
Returns ​
void
addSelectedNodes ​
• addSelectedNodes: (nodes
: GraphNode
<any
, any
, string
>[]) => void
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
<any
, any
, string
>[]
Type declaration ​
â–¸ (changes
): GraphEdge
<any
, any
, string
>[]
applies default edge change handler
Parameters ​
Name | Type |
---|---|
changes | EdgeChange [] |
Returns ​
GraphEdge
<any
, any
, string
>[]
applyNodeChanges ​
• applyNodeChanges: (changes
: NodeChange
[]) => GraphNode
<any
, any
, string
>[]
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
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 ​
fitView ​
• fitView: FitView
Inherited from ​
fromObject ​
• fromObject: (obj
: FlowExportObject
) => void
Type declaration ​
â–¸ (obj
): void
load graph from export obj
Parameters ​
Name | Type |
---|---|
obj | FlowExportObject |
Returns ​
void
getConnectedEdges ​
• getConnectedEdges: (nodesOrId
: string
| Node
<any
, any
, string
>[]) => GraphEdge
<any
, any
, string
>[]
Type declaration ​
â–¸ (nodesOrId
): GraphEdge
<any
, any
, string
>[]
get a node's connected edges
Parameters ​
Name | Type |
---|---|
nodesOrId | string | Node <any , any , string >[] |
Returns ​
GraphEdge
<any
, any
, string
>[]
getIncomers ​
• getIncomers: (nodeOrId
: string
| Node
<any
, any
, string
>) => GraphNode
<any
, any
, string
>[]
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
>[]
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
>[]
getTransform ​
• getTransform: GetViewport
Deprecated
use getViewport instead
Inherited from ​
ViewportFunctions.getTransform
getViewport ​
• getViewport: GetViewport
Inherited from ​
isNodeIntersecting ​
• isNodeIntersecting: IsNodeIntersecting
check if a node is intersecting with a defined area
panBy ​
• panBy: (delta
: XYPosition
) => boolean
Type declaration ​
â–¸ (delta
): boolean
pan the viewport; return indicates if a transform has happened or not
Parameters ​
Name | Type |
---|---|
delta | XYPosition |
Returns ​
boolean
project ​
• project: Project
Inherited from ​
removeEdges ​
• removeEdges: RemoveEdges
remove edges from state
removeNodes ​
• removeNodes: RemoveNodes
remove nodes (and possibly connected edges and children) from state
removeSelectedEdges ​
• removeSelectedEdges: (edges
: GraphEdge
<any
, any
, string
>[]) => void
Type declaration ​
â–¸ (edges
): void
manually unselect edges and remove from state
Parameters ​
Name | Type |
---|---|
edges | GraphEdge <any , any , string >[] |
Returns ​
void
removeSelectedElements ​
• removeSelectedElements: (elements?
: Elements
<any
, any
, any
, any
>) => void
Type declaration ​
â–¸ (elements?
): void
unselect selected elements (if none are passed, all elements are unselected)
Parameters ​
Name | Type |
---|---|
elements? | Elements <any , any , any , any > |
Returns ​
void
removeSelectedNodes ​
• removeSelectedNodes: (nodes
: GraphNode
<any
, any
, string
>[]) => void
Type declaration ​
â–¸ (nodes
): void
manually unselect nodes and remove from state
Parameters ​
Name | Type |
---|---|
nodes | GraphNode <any , any , string >[] |
Returns ​
void
setCenter ​
• setCenter: SetCenter
Inherited from ​
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
Type declaration ​
â–¸ (isInteractive
): void
enable/disable node interaction (dragging, selecting etc)
Parameters ​
Name | Type |
---|---|
isInteractive | boolean |
Returns ​
void
setMaxZoom ​
• setMaxZoom: (zoom
: number
) => void
Type declaration ​
â–¸ (zoom
): void
apply max zoom value to d3
Parameters ​
Name | Type |
---|---|
zoom | number |
Returns ​
void
setMinZoom ​
• setMinZoom: (zoom
: number
) => void
Type declaration ​
â–¸ (zoom
): void
apply min zoom value to d3
Parameters ​
Name | Type |
---|---|
zoom | number |
Returns ​
void
setNodeExtent ​
• setNodeExtent: (nodeExtent
: CoordinateExtent
| CoordinateExtentRange
) => void
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
setState ​
• setState: SetState
set new state
setTransform ​
• setTransform: SetViewport
Deprecated
use setViewport instead
Inherited from ​
ViewportFunctions.setTransform
setTranslateExtent ​
• setTranslateExtent: (translateExtent
: CoordinateExtent
) => void
Type declaration ​
â–¸ (translateExtent
): void
apply translate extent to d3
Parameters ​
Name | Type |
---|---|
translateExtent | CoordinateExtent |
Returns ​
void
setViewport ​
• setViewport: SetViewport
Inherited from ​
startConnection ​
• startConnection: (startHandle
: ConnectingHandle
, position?
: XYPosition
, event?
: MouseEvent
| TouchEvent
, isClick?
: boolean
) => void
Type declaration ​
â–¸ (startHandle
, position?
, event?
, isClick?
): void
start a connection
Parameters ​
Name | Type |
---|---|
startHandle | ConnectingHandle |
position? | XYPosition |
event? | MouseEvent | TouchEvent |
isClick? | boolean |
Returns ​
void
toObject ​
• toObject: () => FlowExportObject
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
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
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
zoomIn ​
• zoomIn: ZoomInOut
Inherited from ​
zoomOut ​
• zoomOut: ZoomInOut
Inherited from ​
zoomTo ​
• zoomTo: ZoomTo