Interface NodeProps<Data, CustomEvents, Type>

these props are passed to node components

Type Parameters

  • Data = ElementData

  • CustomEvents = {}

  • Type extends string = string

Hierarchy

  • NodeProps

Properties

connectable: HandleConnectable

can node handles be connected

data: Data

additional data of node

dimensions: Dimensions

dom element dimensions (width, height)

dragHandle?: string

drag handle query selector

dragging: boolean

is node currently dragging

events: NodeEventsOn<CustomEvents>

contextual and custom events of node

id: string

unique node id

isValidSourcePos?: ValidConnectionFunc

Deprecated

will be removed in next major release and replaced by just isValidConnection prop called when used as source for new connection

isValidTargetPos?: ValidConnectionFunc

Deprecated

will be removed in next major release and replaced by just isValidConnection prop called when used as target for new connection

label?: string | Object | VNode<RendererNode, RendererElement, {
    [key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>

node label, either pass a string or a VNode For example like this: h('div', props, children)) Object is just a type-hack for Vue, ignore that

parent?: string

todo: rename to parentNodeId parent node id

position: XYPosition

node x, y (relative) position on graph

resizing: boolean

is node currently resizing

selected: boolean

is node selected

sourcePosition?: Position

handle position

targetPosition?: Position

handle position

type: Type

node type

zIndex: number

node z-index

Generated using TypeDoc