refactor(types): drop NodeInternalsItem type

This commit is contained in:
moklick
2022-01-19 22:17:07 +01:00
parent 08b2696e6b
commit e52c5eda19
7 changed files with 35 additions and 46 deletions
+4 -4
View File
@@ -172,13 +172,13 @@ export function getNodeData(nodeInternals: NodeInternals, nodeId: string): [Rect
!node.handleBounds ||
!node.width ||
!node.height ||
typeof node.positionAbsolute.x === 'undefined' ||
typeof node.positionAbsolute.y === 'undefined';
typeof node.positionAbsolute?.x === 'undefined' ||
typeof node.positionAbsolute?.y === 'undefined';
return [
{
x: node?.positionAbsolute.x || 0,
y: node?.positionAbsolute.y || 0,
x: node?.positionAbsolute?.x || 0,
y: node?.positionAbsolute?.y || 0,
width: node?.width || 0,
height: node?.height || 0,
},