Skip to content

Commit cb8d0eb

Browse files
Don't load the view coordinates when loading a workflow from the history.
I think this makes things slightly less annoying for some users.
1 parent 809cc85 commit cb8d0eb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

web/scripts/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1800,7 +1800,7 @@ export class ComfyApp {
18001800
* @param {*} graphData A serialized graph object
18011801
* @param { boolean } clean If the graph state, e.g. images, should be cleared
18021802
*/
1803-
async loadGraphData(graphData, clean = true) {
1803+
async loadGraphData(graphData, clean = true, restore_view = true) {
18041804
if (clean !== false) {
18051805
this.clean();
18061806
}
@@ -1836,7 +1836,7 @@ export class ComfyApp {
18361836

18371837
try {
18381838
this.graph.configure(graphData);
1839-
if (this.enableWorkflowViewRestore.value && graphData.extra?.ds) {
1839+
if (restore_view && this.enableWorkflowViewRestore.value && graphData.extra?.ds) {
18401840
this.canvas.ds.offset = graphData.extra.ds.offset;
18411841
this.canvas.ds.scale = graphData.extra.ds.scale;
18421842
}

web/scripts/ui.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class ComfyList {
228228
$el("button", {
229229
textContent: "Load",
230230
onclick: async () => {
231-
await app.loadGraphData(item.prompt[3].extra_pnginfo.workflow);
231+
await app.loadGraphData(item.prompt[3].extra_pnginfo.workflow, true, false);
232232
if (item.outputs) {
233233
app.nodeOutputs = item.outputs;
234234
}

0 commit comments

Comments
 (0)