refactor(nodeInternals): widht and height types optional

This commit is contained in:
moklick
2021-12-07 02:01:40 +01:00
parent b5bba7dc70
commit c2644f16bb
2 changed files with 2 additions and 4 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ function useNodeDimensions(id: string): Rect | null {
return {
...nodeItem.positionAbsolute,
width: nodeItem.width,
height: nodeItem.height,
width: nodeItem.width ?? 0,
height: nodeItem.height ?? 0,
};
},
[id]
-2
View File
@@ -104,8 +104,6 @@ export type NodeDimensionUpdate = {
};
export type NodeInternalsItem = Node & {
width: number;
height: number;
positionAbsolute: XYPosition;
z: number;
handleBounds?: NodeHandleBounds;