From b3ad58df2bd105eb28b140928229dc02068fc86e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Mar 2026 01:40:06 +0000 Subject: [PATCH] Revert "Fix node height growing on remount with onlyRenderVisibleElements" This reverts commit fcdeb6ff6f48e77b3d4b41813dbc4db107562ce5. --- src/components/nodes/BaseNode.tsx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/components/nodes/BaseNode.tsx b/src/components/nodes/BaseNode.tsx index e5f1cca1..d5373219 100644 --- a/src/components/nodes/BaseNode.tsx +++ b/src/components/nodes/BaseNode.tsx @@ -80,21 +80,9 @@ export function BaseNode({ const trackedSettingsHeightRef = useRef(0); const isAnimatingRef = useRef(false); const animationTimeoutRef = useRef | null>(null); - const isInitialMountRef = useRef(true); // Adjust node height when settings expand or collapse useLayoutEffect(() => { - // On initial mount with settings already expanded (e.g. remount after - // onlyRenderVisibleElements), the node height already includes the panel. - // Just sync the tracked ref without adding height again. - if (isInitialMountRef.current) { - isInitialMountRef.current = false; - if (settingsExpanded && settingsPanelRef.current) { - trackedSettingsHeightRef.current = settingsPanelRef.current.offsetHeight; - } - return; - } - // Cancel any pending animation timeout from a previous toggle (handles rapid toggling) if (animationTimeoutRef.current) { clearTimeout(animationTimeoutRef.current);