feat: testing on how to flatten tree structures

This commit is contained in:
2024-04-05 16:45:57 +02:00
parent 473f696626
commit 68d1bac572
23 changed files with 348 additions and 307 deletions

View File

@ -53,7 +53,7 @@
<div class="wrapper" data-node-id={node.id}>
<div class="content">
{node.type} / {node.id}
{node.type.split("/").pop()}
</div>
<div
class="click-target"

View File

@ -5,17 +5,17 @@
export let node: Node;
export let input: NodeInput;
export let id: string;
export let label: string;
const graph = getGraphManager();
let value = node?.props?.[id] ?? input.value;
let value = node?.props?.[label] ?? input.value;
$: if (node?.props?.[id] !== value) {
node.props = { ...node.props, [id]: value };
$: if (node?.props?.[label] !== value) {
node.props = { ...node.props, [label]: value };
graph.execute();
}
</script>
<label for="asd">{id}</label>
<label for="asd">{label}</label>
<Input {input} bind:value />

View File

@ -69,7 +69,7 @@
>
{#key id && graphId}
<div class="content" class:disabled={$inputSockets.has(socketId)}>
<NodeInput {node} {input} {id} />
<NodeInput {node} {input} label={input?.title || id} />
</div>
{#if node?.tmp?.type?.inputs?.[id]?.internal !== true}