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 | NodeType["id"] Unique id of a node. | |
position | NodeType["position"] Position of a node on the pane. | |
data | NodeType["data"] Arbitrary data passed to a node. | |
type | NodeType["type"] Type of node defined in | |
sourcePosition | NodeType["sourcePosition"] Only relevant for default, source, target nodeType. Controls source position. | |
targetPosition | NodeType["targetPosition"] Only relevant for default, source, target nodeType. Controls target position. | |
selected | NodeType["selected"] | |
dragging | NodeType["dragging"] Whether or not the node is currently being dragged. | |
draggable | NodeType["draggable"] Whether or not the node is able to be dragged. | |
selectable | NodeType["selectable"] | |
connectable | NodeType["connectable"] | |
deletable | NodeType["deletable"] | |
dragHandle | NodeType["dragHandle"] A class name that can be applied to elements inside the node that allows those elements to act as drag handles, letting the user drag the node by clicking and dragging on those elements. | |
width | NodeType["width"] | |
height | NodeType["height"] | |
initialWidth | NodeType["initialWidth"] | |
initialHeight | NodeType["initialHeight"] | |
parentId | NodeType["parentId"] Parent node id, used for creating sub-flows. | |
zIndex | NodeType["zIndex"] | |
extent | NodeType["extent"] Boundary a node can be moved in. | |
expandParent | NodeType["expandParent"] When | |
ariaLabel | NodeType["ariaLabel"] | |
origin | NodeType["origin"] Origin of the node relative to its position. | |
handles | NodeType["handles"] | |
measured | { width?: number; height?: number; } | |
internals | { positionAbsolute: XYPosition; z: number; userNode: NodeType; handleBounds?: NodeHandleBounds; bounds?: NodeBounds; } |