Skip to content

Interface: Actions ​

Hierarchy ​

  • Omit<ViewportHelper, "viewportInitialized">

    ↳ Actions

Table of contents ​

Properties ​

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

GraphEdge[]


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 ​
NameType
changesNodeChange[]
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 ​
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 ​

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 ​
NameType
objFlowExportObject
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 ​
NameType
nodesOrIdstring | Node<any, any, string>[]
Returns ​

GraphEdge[]


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 ​
NameType
nodeOrIdstring | 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 ​
NameType
nodeOrIdstring | 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 ​
NameType
deltaXYPosition
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 ​
NameType
edgesGraphEdge[]
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 ​
NameType
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 ​
NameType
nodesGraphNode<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 ​
NameType
isInteractiveboolean
Returns ​

void


setMaxZoom ​

• setMaxZoom: (zoom: number) => void

apply max zoom value to panzoom

Type declaration ​

â–¸ (zoom): void

apply max zoom value to panzoom

Parameters ​
NameType
zoomnumber
Returns ​

void


setMinZoom ​

• setMinZoom: (zoom: number) => void

apply min zoom value to panzoom

Type declaration ​

â–¸ (zoom): void

apply min zoom value to panzoom

Parameters ​
NameType
zoomnumber
Returns ​

void


setNodeExtent ​

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

apply extent to nodes

Type declaration ​

â–¸ (nodeExtent): void

apply extent to nodes

Parameters ​
NameType
nodeExtentCoordinateExtent | CoordinateExtentRange
Returns ​

void


setNodes ​

• setNodes: SetNodes

parses nodes and re-sets the state


setPaneClickDistance ​

• setPaneClickDistance: (distance: number) => void

Type declaration ​

â–¸ (distance): void

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

FlowExportObject


updateConnection ​

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

update connection position

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


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

Released under the MIT License.