From 7747456771584190be568461cb24a9c07c5d2f04 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 25 Mar 2022 17:22:49 +0100 Subject: [PATCH] feat(nodes): Add dimensions to nodeprops --- src/components/Nodes/NodeWrapper.vue | 2 ++ src/types/node.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/components/Nodes/NodeWrapper.vue b/src/components/Nodes/NodeWrapper.vue index 03092ec3..fd05a54a 100644 --- a/src/components/Nodes/NodeWrapper.vue +++ b/src/components/Nodes/NodeWrapper.vue @@ -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, diff --git a/src/types/node.ts b/src/types/node.ts index 19d7b13f..812655f1 100644 --- a/src/types/node.ts +++ b/src/types/node.ts @@ -47,6 +47,8 @@ export interface NodeProps { computedPosition: XYZPosition /** x and y position on the graph */ position: XYPosition + /** node dimensions (width, height) */ + dimensions: Dimensions label?: | string | {