refactor(nodeInternals): widht and height types optional
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -104,8 +104,6 @@ export type NodeDimensionUpdate = {
|
||||
};
|
||||
|
||||
export type NodeInternalsItem = Node & {
|
||||
width: number;
|
||||
height: number;
|
||||
positionAbsolute: XYPosition;
|
||||
z: number;
|
||||
handleBounds?: NodeHandleBounds;
|
||||
|
||||
Reference in New Issue
Block a user