@braks/vue-flow / Actions

Interface: Actions

Hierarchy

Table of contents

Properties

Methods

Properties

addEdges

addEdges: AddEdges

parses edges and adds to state


addNodes

addNodes: AddNodes

parses nodes and adds to state


fitBounds

fitBounds: FitBounds

Inherited from

ViewportFunctions.fitBounds


fitView

fitView: FitView

Inherited from

ViewportFunctions.fitView


getTransform

getTransform: GetTransform

Inherited from

ViewportFunctions.getTransform


project

project: Project

Inherited from

ViewportFunctions.project


removeEdges

removeEdges: RemoveEdges

remove edges from state


removeNodes

removeNodes: RemoveNodes

remove nodes (and possibly connected edges) from state


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


setNodes

setNodes: SetNodes

parses nodes and re-sets the state


setState

setState: SetState

set new state


setTransform

setTransform: SetTransform

Inherited from

ViewportFunctions.setTransform


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

Methods

$reset

$reset(): void

reset state to defaults

Returns

void


addSelectedEdges

addSelectedEdges(edges): void

manually select edges and add to state

Parameters

NameType
edgesGraphEdge<any, any>[]

Returns

void


addSelectedElements

addSelectedElements(elements): void

manually select elements and add to state

Parameters

NameType
elementsFlowElements<any>

Returns

void


addSelectedNodes

addSelectedNodes(nodes): void

manually select nodes and add to state

Parameters

NameType
nodesGraphNode<any, any>[]

Returns

void


applyEdgeChanges

applyEdgeChanges(changes): GraphEdge<any, any>[]

applies default edge change handler

Parameters

NameType
changesEdgeChange[]

Returns

GraphEdge<any, any>[]


applyNodeChanges

applyNodeChanges(changes): GraphNode<any, any>[]

applies default node change handler

Parameters

NameType
changesNodeChange[]

Returns

GraphNode<any, any>[]


removeSelectedEdges

removeSelectedEdges(edges): void

manually unselect edges and remove from state

Parameters

NameType
edgesGraphEdge<any, any>[]

Returns

void


removeSelectedElements

removeSelectedElements(elements?): void

unselect selected elements (if none are passed, all elements are unselected)

Parameters

NameType
elements?Object
elements.edges?GraphEdge<any, any>[]
elements.nodes?GraphNode<any, any>[]

Returns

void


removeSelectedNodes

removeSelectedNodes(nodes): void

manually unselect nodes and remove from state

Parameters

NameType
nodesGraphNode<any, any>[]

Returns

void


setInteractive

setInteractive(isInteractive): void

enable/disable node interaction (dragging, selecting etc)

Parameters

NameType
isInteractiveboolean

Returns

void


setMaxZoom

setMaxZoom(zoom): void

apply max zoom value to d3

Parameters

NameType
zoomnumber

Returns

void


setMinZoom

setMinZoom(zoom): void

apply min zoom value to d3

Parameters

NameType
zoomnumber

Returns

void


setTranslateExtent

setTranslateExtent(translateExtent): void

apply translate extent to d3

Parameters

NameType
translateExtentCoordinateExtent

Returns

void


toObject

toObject(): FlowExportObject

return an object of graph values (elements, viewpane transform) for storage and re-loading a graph

Returns

FlowExportObject