refactor(nodeInternals): widht and height types optional
This commit is contained in:
@@ -16,8 +16,8 @@ function useNodeDimensions(id: string): Rect | null {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
...nodeItem.positionAbsolute,
|
...nodeItem.positionAbsolute,
|
||||||
width: nodeItem.width,
|
width: nodeItem.width ?? 0,
|
||||||
height: nodeItem.height,
|
height: nodeItem.height ?? 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[id]
|
[id]
|
||||||
|
|||||||
@@ -104,8 +104,6 @@ export type NodeDimensionUpdate = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type NodeInternalsItem = Node & {
|
export type NodeInternalsItem = Node & {
|
||||||
width: number;
|
|
||||||
height: number;
|
|
||||||
positionAbsolute: XYPosition;
|
positionAbsolute: XYPosition;
|
||||||
z: number;
|
z: number;
|
||||||
handleBounds?: NodeHandleBounds;
|
handleBounds?: NodeHandleBounds;
|
||||||
|
|||||||
Reference in New Issue
Block a user