From 38f18d89d75a362225b7f9cca125136fa58f8a57 Mon Sep 17 00:00:00 2001 From: doctoroyy Date: Fri, 15 Oct 2021 21:11:28 +0800 Subject: [PATCH] fix: avoid render all nodes at first render if set width --- src/utils/graph.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/graph.ts b/src/utils/graph.ts index 73b6c68b..39708d72 100644 --- a/src/utils/graph.ts +++ b/src/utils/graph.ts @@ -153,8 +153,8 @@ export const parseNode = (node: Node, nodeExtent: NodeExtent): Node => { type: node.type || 'default', __rf: { position: clampPosition(node.position, nodeExtent), - width: null, - height: null, + width: node.style?.width || null, + height: node.style?.height || null, handleBounds: {}, isDragging: false, },