mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-25 09:14:25 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user