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 | stringUnique id of a node | |
position | XYPositionPosition of a node on the pane | |
data | Record<string, unknown>Arbitrary data passed to a node | |
type | stringType of node defined in nodeTypes | |
sourcePosition | PositionOnly relevant for default, source, target nodeType. controls source position | |
targetPosition | PositionOnly relevant for default, source, target nodeType. controls target position | |
selected | boolean | |
dragging | booleanTrue, if node is being dragged | |
draggable | boolean | |
selectable | boolean | |
connectable | boolean | |
deletable | boolean | |
dragHandle | string | |
width | number | |
height | number | |
initialWidth | number | |
initialHeight | number | |
parentId | stringParent node id, used for creating sub-flows | |
zIndex | number | |
extent | "parent" | CoordinateExtentBoundary a node can be moved in | |
expandParent | boolean | |
ariaLabel | string | |
origin | NodeOriginOrigin 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