From dbe65fa98cb6e22f0c5d6c0e9cd54397f6094cc8 Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Wed, 5 Apr 2023 02:14:32 -0500 Subject: [PATCH] Drag and drop --- src/lib/components/ComfyApp.svelte | 33 ++++++- src/lib/components/ComfyPane.svelte | 119 ++++++++++++++++++++++++++ src/lib/components/ComfyUIPane.svelte | 99 ++++++--------------- vite.config.ts | 2 +- 4 files changed, 177 insertions(+), 76 deletions(-) create mode 100644 src/lib/components/ComfyPane.svelte diff --git a/src/lib/components/ComfyApp.svelte b/src/lib/components/ComfyApp.svelte index 463b2f5..d0bbafb 100644 --- a/src/lib/components/ComfyApp.svelte +++ b/src/lib/components/ComfyApp.svelte @@ -1,6 +1,7 @@ + + +
+ {#each dragItems as dragItem(dragItem.id)} + {@const node = dragItem.node} + {@const id = node.id} + +
+ + {#each items[id] as item, i} + {#if item.widget.type == "combo"} +
+ +
+ {:else if item.widget.type == "number"} +
+ +
+ {:else if item.widget.type == "text"} +
+ +
+ {/if} + {/each} + + {/each} +
+ + diff --git a/src/lib/components/ComfyUIPane.svelte b/src/lib/components/ComfyUIPane.svelte index 9d16af1..37f2197 100644 --- a/src/lib/components/ComfyUIPane.svelte +++ b/src/lib/components/ComfyUIPane.svelte @@ -1,22 +1,26 @@ -
-
- {#each Object.keys(items) as id} - {@const node = nodes[id]} - - - {#each items[id] as item, i} - {#if item.widget.type == "combo"} -
- -
- {:else if item.widget.type == "number"} -
- -
- {:else if item.widget.type == "text"} -
- -
- {/if} - {/each} -
- {/each} -
-
-
-
-
- -
-
+
+ + +