Skip to content
On this page

Interface: Actions ​

Hierarchy ​

Table of contents ​

Properties ​

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 ​
NameType
edgesGraphEdge<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 ​
NameType
elementsFlowElements<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 ​
NameType
nodesGraphNode<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 ​
NameType
changesEdgeChange[]
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 ​
NameType
changesNodeChange[]
Returns ​

GraphNode<any, any, string>[]


endConnection ​

• endConnection: (event?: MouseEvent | TouchEvent, isClick?: boolean) => void

Type declaration ​

â–¸ (event?, isClick?): void

end (or cancel) a connection

Parameters ​
NameType
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 ​

ViewportFunctions.fitBounds


fitView ​

• fitView: FitView

Inherited from ​

ViewportFunctions.fitView


fromObject ​

• fromObject: (obj: FlowExportObject) => void

Type declaration ​

â–¸ (obj): void

load graph from export obj

Parameters ​
NameType
objFlowExportObject
Returns ​

void


getIntersectingNodes ​

• getIntersectingNodes: GetIntersectingNodes

returns all node intersections


getTransform ​

• getTransform: GetViewport

Deprecated

use getViewport instead

Inherited from ​

ViewportFunctions.getTransform


getViewport ​

• getViewport: GetViewport

Inherited from ​

ViewportFunctions.getViewport


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 ​
NameType
deltaXYPosition
Returns ​

boolean


project ​

• project: Project

Inherited from ​

ViewportFunctions.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<any, any, string>[]) => void

Type declaration ​

â–¸ (edges): void

manually unselect edges and remove from state

Parameters ​
NameType
edgesGraphEdge<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 ​
NameType
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 ​
NameType
nodesGraphNode<any, any, string>[]
Returns ​

void


setCenter ​

• setCenter: SetCenter

Inherited from ​

ViewportFunctions.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

Type declaration ​

â–¸ (isInteractive): void

enable/disable node interaction (dragging, selecting etc)

Parameters ​
NameType
isInteractiveboolean
Returns ​

void


setMaxZoom ​

• setMaxZoom: (zoom: number) => void

Type declaration ​

â–¸ (zoom): void

apply max zoom value to d3

Parameters ​
NameType
zoomnumber
Returns ​

void


setMinZoom ​

• setMinZoom: (zoom: number) => void

Type declaration ​

â–¸ (zoom): void

apply min zoom value to d3

Parameters ​
NameType
zoomnumber
Returns ​

void


setNodeExtent ​

• setNodeExtent: (nodeExtent: CoordinateExtent | CoordinateExtentRange) => void

Type declaration ​

â–¸ (nodeExtent): void

apply extent to nodes

Parameters ​
NameType
nodeExtentCoordinateExtent | 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 ​
NameType
translateExtentCoordinateExtent
Returns ​

void


setViewport ​

• setViewport: SetViewport

Inherited from ​

ViewportFunctions.setViewport


startConnection ​

• startConnection: (startHandle: ConnectingHandle, position?: XYPosition, event?: MouseEvent | TouchEvent, isClick?: boolean) => void

Type declaration ​

â–¸ (startHandle, position?, event?, isClick?): void

start a connection

Parameters ​
NameType
startHandleConnectingHandle
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 ​

FlowExportObject


updateConnection ​

• updateConnection: (position: XYPosition, result?: null | ConnectingHandle, status?: null | ConnectionStatus) => void

Type declaration ​

â–¸ (position, result?, status?): void

update connection position

Parameters ​
NameType
positionXYPosition
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 ​

ViewportFunctions.zoomIn


zoomOut ​

• zoomOut: ZoomInOut

Inherited from ​

ViewportFunctions.zoomOut


zoomTo ​

• zoomTo: ZoomTo

Inherited from ​

ViewportFunctions.zoomTo

Released under the MIT License.