diff --git a/src/lib/components/ComfyApp.svelte b/src/lib/components/ComfyApp.svelte index 79fd711..3c4dcad 100644 --- a/src/lib/components/ComfyApp.svelte +++ b/src/lib/components/ComfyApp.svelte @@ -12,9 +12,11 @@ let app: ComfyApp = undefined; let uiPane: ComfyUIPane = undefined; let containerElem: HTMLDivElement; + let resizeTimeout: typeof Timer = -1; function refreshView(event) { - app.resizeCanvas(); + clearTimeout(resizeTimeout); + resizeTimeout = setTimeout(app.resizeCanvas.bind(app), 250); } function queuePrompt() { @@ -35,10 +37,6 @@ } } - function testtr() { - console.warn("TESTTR!") - } - let graphResizeTimer: typeof Timer = -1; onMount(async () => { @@ -54,7 +52,7 @@ (window as any).app = app; - let graphPaneDiv = containerElem.querySelector("canvas").parentNode as HTMLDivNode; + let graphPaneDiv = containerElem.querySelector(".canvas-wrapper").parentNode as HTMLDivNode; graphPaneDiv.ontransitionend = () => { app.resizeCanvas() } @@ -64,21 +62,23 @@