mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 01:20:09 +00:00
## Summary Three interacting bugs caused cumulative height loss (~66px per cycle): 1. useVueNodeLifecycle incorrectly subtracted NODE_TITLE_HEIGHT from LGraphNode.size[1] during layout init, but size[1] is already content-only (title excluded per LGraphNode.measure()). 2. ensureCorrectLayoutScale added/subtracted NODE_TITLE_HEIGHT in scale formulas, breaking the round-trip. Simplified to pure ratio scaling (size * scaleFactor). Also set LayoutSource.Canvas before batchUpdateNodeBounds to prevent stale DOM source from triggering incorrect height normalization. 3. initSizeStyles set --node-height (min-height of the full DOM element including title) to the content-only layout height. Added NODE_TITLE_HEIGHT so ResizeObserver captures the correct total height and normalization recovers the exact content height. ## Screenshots (if applicable) before https://github.com/user-attachments/assets/ae41124b-f9e3-4061-8127-eeacddc67a55 after https://github.com/user-attachments/assets/5ff288a6-73a3-481a-a750-150d9bdbc8fe ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8697-fix-prevent-node-height-shrinking-on-vueNodes-litegraph-mode-switch-2ff6d73d365081c7a2acdc7ec57e2e19) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>