InternalNode
The InternalNode
type is identical to the base Node
type but is extended with some additional properties used internally by React
Flow. Some functions and callbacks that return nodes may return an InternalNode
.
export type InternalNodeBase<NodeType extends NodeBase = NodeBase> =
NodeType & {
measured: {
width?: number;
height?: number;
};
internals: {
positionAbsolute: XYPosition;
z: number;
userNode: NodeType;
handleBounds?: NodeHandleBounds;
bounds?: NodeBounds;
};
};
Fields
Name | Type | Default |
---|---|---|
id | string Unique id of a node | |
position | XYPosition Position of a node on the pane | |
data | Record<string, unknown> Arbitrary data passed to a node | |
type | string Type of node defined in nodeTypes | |
sourcePosition | Position Only relevant for default, source, target nodeType. controls source position | |
targetPosition | Position Only relevant for default, source, target nodeType. controls target position | |
selected | boolean | |
dragging | boolean True, if node is being dragged | |
draggable | boolean | |
selectable | boolean | |
connectable | boolean | |
deletable | boolean | |
dragHandle | string | |
width | number | |
height | number | |
initialWidth | number | |
initialHeight | number | |
parentId | string Parent node id, used for creating sub-flows | |
zIndex | number | |
extent | "parent" | CoordinateExtent Boundary a node can be moved in | |
expandParent | boolean | |
ariaLabel | string | |
origin | NodeOrigin Origin of the node relative to it’s position | |
handles | NodeHandle[] | |
measured | { width?: number; height?: number; } & { width?: number; height?: number; } | |
internals | { positionAbsolute: XYPosition; z: number; userNode: NodeType; handleBounds?: NodeHandleBounds; bounds?: NodeBounds; } |
Last updated on