Skip to content

API

Complete reference documentation for all classes, methods, and properties in Vyuh Node Flow.

Core Classes

  • NodeFlowController - Central controller for managing the graph state
  • Node - Individual nodes in the graph with data and ports
  • Port - Connection points on nodes
  • Connection - Links between node ports

Widgets

Events

Theming

Quick Reference

Controller Methods

MethodDescription
addNode(node)Add a node to the graph
removeNode(id)Remove a node by ID
moveNode(id, delta)Move a node by offset
setNodeSize(id, size)Update node size
addConnection(conn)Create a connection
removeConnection(id)Remove a connection
selectNode(id)Select a node
clearSelection()Clear all selections
fitToView()Fit viewport to content
zoomTo(level)Set zoom level
panBy(delta)Pan by offset
loadGraph(graph)Load complete graph
exportGraph()Export graph state

Node Properties

PropertyTypeDescription
idStringUnique identifier
typeStringNode type for categorization
positionOffsetPosition on canvas
sizeSizeNode dimensions
dataTCustom data payload
inputPortsList<Port>Input connection ports
outputPortsList<Port>Output connection ports
lockedboolPrevents dragging/deletion when true
layerNodeRenderLayerRendering layer (background/middle/foreground)

Port Properties

PropertyTypeDescription
idStringUnique identifier
nameString?Display name
positionPortPositionSide of node (top, right, bottom, left)
typePortTypeDirection (input, output)
shapeMarkerShapeVisual shape
colorColor?Port color override

Connection Properties

PropertyTypeDescription
idStringUnique identifier
sourceNodeIdStringSource node ID
sourcePortIdStringSource port ID
targetNodeIdStringTarget node ID
targetPortIdStringTarget port ID
labelConnectionLabel?Center label
startLabelConnectionLabel?Label at source
endLabelConnectionLabel?Label at target
lockedboolPrevents deletion when true