ComfyUI_frontend
ComfyUI_frontend copied to clipboard
[Bug]: Zoom level is not restored when loading workflows
Frontend Version
1.7.14
Expected Behavior
When the "Comfy.EnableWorkflowViewRestore" setting is enabled, the zoom level (scale) should be serialized and restored.
Actual Behavior
When saving workflows, the offset is serialized and restored but the zoom level (scale) is always 1.
Steps to Reproduce
"Comfy.EnableWorkflowViewRestore"- Create a new workflow
- Zoom out or in
- Save the workflow
- Close the workflow
- Load the workflow
- Observe zoom is not restored
Debug Logs
None
Browser Logs
None
Setting JSON
What browsers do you use to access the UI ?
Google Chrome
Other
No response
┆Issue is synchronized with this Notion page by Unito
The issue actually only occurs if changing the zoom level was the last change made to workflow before saving, as it's not a tracked change:
https://github.com/Comfy-Org/ComfyUI_frontend/blob/816574e0aba1425bcc047f0dcf3198e4abd1441a/src/scripts/changeTracker.ts#L393-L397
All solutions to this edge case that I can think of would not be worth the added overhead.