feat(nodes): Add dimensions to nodeprops

This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent aa44fc300d
commit 7747456771
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -157,6 +157,7 @@ export default {
isConnectable: props.connectable,
position: node.position,
computedPosition: node.computedPosition,
dimensions: node.dimensions,
isValidTargetPos: node.isValidTargetPos,
isValidSourcePos: node.isValidSourcePos,
parentNode: node.parentNode ? node.parentNode.id : undefined,
@@ -179,6 +180,7 @@ export default {
connectable: props.connectable,
position: node.position,
computedPosition: node.computedPosition,
dimensions: node.dimensions,
isValidTargetPos: node.isValidTargetPos,
isValidSourcePos: node.isValidSourcePos,
parentNode: node.parentNode ? node.parentNode.id : undefined,
+2
View File
@@ -47,6 +47,8 @@ export interface NodeProps<T = any> {
computedPosition: XYZPosition
/** x and y position on the graph */
position: XYPosition
/** node dimensions (width, height) */
dimensions: Dimensions
label?:
| string
| {