From e62994aa868e2b899130cfac78fa9b30958e0886 Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Fri, 7 Apr 2023 06:30:21 -0500 Subject: [PATCH] Fix sidebar --- src/lib/components/ComfyApp.svelte | 34 ++++++++++++++++++------------ src/lib/components/ComfyApp.ts | 17 ++++----------- 2 files changed, 24 insertions(+), 27 deletions(-) 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 @@
- -
- Sidebar -
-
- +
+ +
+ +
+ Sidebar +
+
@@ -93,6 +93,7 @@