From 5a0f513c3fbd5634965850094b307139566cfb22 Mon Sep 17 00:00:00 2001 From: moklick Date: Sun, 8 May 2022 13:28:13 +0200 Subject: [PATCH] refactor(node-internals): only keep width, height and handleBounds --- src/store/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/store/utils.ts b/src/store/utils.ts index eb99b0c3..d30dfd4d 100644 --- a/src/store/utils.ts +++ b/src/store/utils.ts @@ -43,9 +43,12 @@ export function createNodeInternals(nodes: Node[], nodeInternals: NodeInternals) nodes.forEach((node) => { const z = isNumeric(node.zIndex) ? node.zIndex : node.dragging || node.selected ? 1000 : 0; + const currInternals = nodeInternals.get(node.id); const internals: Node = { - ...nodeInternals.get(node.id), + width: currInternals?.width, + height: currInternals?.height, + handleBounds: currInternals?.handleBounds, ...node, positionAbsolute: { x: node.position.x,