From 24500415cf5ad6f5609aa0431684e4123538dfe8 Mon Sep 17 00:00:00 2001 From: Austin Mroz Date: Mon, 5 Jan 2026 11:40:45 -0800 Subject: [PATCH] Fix swapping from linear to normal workflow There was an attempted fitView with 0 visible area Not super happy with location of fix - FitView shouldn't cause total loss of functionality if called from invalid state - As previously discussed, this fitview call should probably be moved to only apply on newly loaded workflow, not restored workflows --- src/scripts/app.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scripts/app.ts b/src/scripts/app.ts index f2fd59b3d..140d79113 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -1227,6 +1227,8 @@ export class ComfyApp { // Fit view if no nodes visible in restored viewport this.canvas.ds.computeVisibleArea(this.canvas.viewport) if ( + this.canvas.visible_area.width && + this.canvas.visible_area.height && !anyItemOverlapsRect( this.rootGraph._nodes, this.canvas.visible_area