InternalNode
InternalNode
類型與基礎 Node
類型相同,但擴展了一些 React Flow 內部使用的額外屬性。一些傳回節點的函式和回呼可能會傳回 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;
};
};
欄位
名稱 | 類型 |
---|---|
# id | 字串 |
# position | XYPosition |
# data | T |
# type? | U |
# sourcePosition? | Position |
# targetPosition? | Position |
# hidden? | 布林值 節點是否應在畫布上顯示。 |
# selected? | 布林值 |
# dragging? | 布林值 節點目前是否正在被拖曳。 |
# draggable? | 布林值 節點是否可以被拖曳。 |
# selectable? | 布林值 |
# connectable? | 布林值 |
# resizing? | 布林值 |
# deletable? | 布林值 |
# dragHandle? | 字串 |
# width? | 數字 | null |
# height? | 數字 | null |
# parentNode? | 字串 |
# parentId? | 字串 |
# zIndex? | 數字 |
# extent? | "父節點" | CoordinateExtent |
# expandParent? | 布林值 若為 true,當此節點被拖曳至父節點邊緣時,父節點會自動展開。 |
# positionAbsolute? | XYPosition |
# ariaLabel? | 字串 |
# focusable? | 布林值 |
# style? | React.CSSProperties |
# className? | 字串 |
# handles? | NodeHandle[] |
# origin? | NodeOrigin |
# measured? | { 寬度?: 數字, 高度?: 數字 } |
# internals | 物件 |
# internals.positionAbsolute | XYPosition |
# internals.z | 數字 |
# internals.userNode | 節點類型 |
# internals.handleBounds? | NodeHandleBounds |
# internals.bounds? | NodeBounds |