mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-09-14 05:25:23 +00:00
Add a button to reset the view.
This commit is contained in:
@@ -2313,6 +2313,12 @@ export class ComfyApp {
|
||||
await this.#invokeExtensionsAsync("refreshComboInNodes", defs);
|
||||
}
|
||||
|
||||
resetView() {
|
||||
app.canvas.ds.scale = 1;
|
||||
app.canvas.ds.offset = [0, 0]
|
||||
app.graph.setDirtyCanvas(true, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean current state
|
||||
*/
|
||||
|
Reference in New Issue
Block a user