Image cache node

This commit is contained in:
space-nuko
2023-05-05 20:22:12 -05:00
parent 7ddda80cf6
commit ad35826c7b
17 changed files with 358 additions and 33 deletions

View File

@@ -41,6 +41,13 @@
targetType = ""
}
function validNodeProperty(spec: AttributesSpec, node: LGraphNode): boolean {
if (spec.validNodeTypes) {
return spec.validNodeTypes.indexOf(node.type) !== -1;
}
return spec.name in node.properties
}
function updateAttribute(entry: AttributesSpec, value: any) {
if (target) {
const name = entry.name
@@ -157,7 +164,7 @@
{/if}
</div>
{:else if node}
{#if spec.location === "nodeProps" && spec.name in node.properties}
{#if spec.location === "nodeProps" && validNodeProperty(spec, node)}
<div class="props-entry">
{#if spec.type === "string"}
<TextBox