editor.handle.exitNestedNetwork($nodeGraph.subgraphPath?.length - index)} /> {#if $nodeGraph.contextMenuInformation} {#if $nodeGraph.contextMenuInformation.contextMenuData === "CreateNode"} (searchTerm = detail)} bind:this={nodeSearchInput} />
{#each nodeCategories as nodeCategory}
{nodeCategory[0]} {#each nodeCategory[1].nodes as nodeType} createNode(nodeType.name)} /> {/each}
{:else} No search results {/each}
{:else} {@const contextMenuData = $nodeGraph.contextMenuInformation.contextMenuData} Display as { toggleLayerDisplay(false, contextMenuData.nodeId); }, }, { value: "layer", label: "Layer", action: () => { toggleLayerDisplay(true, contextMenuData.nodeId); }, }, ]} disabled={!canBeToggledBetweenNodeAndLayer(contextMenuData.nodeId)} /> {/if}
{/if}
{#each wirePaths as { pathString, dataType, thick, dashed }} {/each}
{#each $nodeGraph.nodes.flatMap((node, nodeIndex) => (node.isLayer ? [{ node, nodeIndex }] : [])) as { node, nodeIndex } (nodeIndex)} {@const clipPathId = String(Math.random()).substring(2)} {@const stackDataInput = node.exposedInputs[0]} {@const layerAreaWidth = $nodeGraph.layerWidths.get(node.id) || 8}
{#if node.errors} {node.errors} {node.errors} {/if}
{#if $nodeGraph.thumbnails.has(node.id)} {@html $nodeGraph.thumbnails.get(node.id)} {/if} {#if node.primaryOutput} {`${dataTypeTooltip(node.primaryOutput)}\n${connectedToText(node.primaryOutput)}`} {#if node.primaryOutput.connected.length > 0} {#if Number(node.primaryOutput?.connectedIndex) === 0 && $nodeGraph.nodes.find((n) => node.primaryOutput?.connected.includes(n.id))?.isLayer} {/if} {:else} {/if} {/if} {#if node.primaryInput} {`${dataTypeTooltip(node.primaryInput)}\nConnected to ${node.primaryInput?.connected !== undefined ? node.primaryInput.connected : "nothing"}`} {/if} {#if node.primaryInput?.connected !== undefined} {#if $nodeGraph.nodes.find((n) => n.id === node.primaryInput?.connected)?.isLayer} {/if} {:else} {/if}
{#if node.exposedInputs.length > 0}
{`${dataTypeTooltip(stackDataInput)}\nConnected to ${stackDataInput.connected !== undefined ? stackDataInput.connected : "nothing"}`} {#if stackDataInput.connected !== undefined} {:else} {/if}
{/if}
{node.alias}
{ /* Button is purely visual, clicking is handled in NodeGraphMessage::PointerDown */ }} tooltip={node.visible ? "Visible" : "Hidden"} />
{/each} {#each $nodeGraph.nodes.flatMap((node, nodeIndex) => (node.isLayer ? [] : [{ node, nodeIndex }])) as { node, nodeIndex } (nodeIndex)} {@const exposedInputsOutputs = [...node.exposedInputs, ...node.exposedOutputs]} {@const clipPathId = String(Math.random()).substring(2)}
{#if node.errors} {node.errors} {node.errors} {/if}
{node.alias || node.name}
{#if exposedInputsOutputs.length > 0}
{#each exposedInputsOutputs as parameter, index}
{parameter.name}
{/each}
{/if}
{#if node.primaryInput?.dataType} {`${dataTypeTooltip(node.primaryInput)}\nConnected to ${node.primaryInput.connected !== undefined ? node.primaryInput.connected : "nothing"}`} {#if node.primaryInput.connected !== undefined} {:else} {/if} {/if} {#each node.exposedInputs as parameter, index} {#if index < node.exposedInputs.length} {`${dataTypeTooltip(parameter)}\nConnected to ${parameter.connected !== undefined ? parameter.connected : "nothing"}`} {#if parameter.connected !== undefined} {:else} {/if} {/if} {/each}
{#if node.primaryOutput} {`${dataTypeTooltip(node.primaryOutput)}\n${connectedToText(node.primaryOutput)}`} {#if node.primaryOutput.connected !== undefined} {:else} {/if} {/if} {#each node.exposedOutputs as parameter, outputIndex} {`${dataTypeTooltip(parameter)}\n${connectedToText(parameter)}`} {#if parameter.connected !== undefined} {:else} {/if} {/each}
{/each}
{#if $nodeGraph.box}
{/if}