Gallery widget selected index
This commit is contained in:
@@ -47,10 +47,7 @@
|
||||
|
||||
function queuePrompt() {
|
||||
console.log("Queuing!");
|
||||
let subworkflow = $uiState.subWorkflow;
|
||||
if (subworkflow === "")
|
||||
subworkflow = null
|
||||
app.queuePrompt(0, 1, subworkflow);
|
||||
app.queuePrompt(0, 1);
|
||||
}
|
||||
|
||||
$: if (app?.lCanvas) app.lCanvas.allow_dragnodes = !$uiState.nodesLocked;
|
||||
@@ -233,7 +230,6 @@
|
||||
<!-- <Checkbox label="Lock Nodes" bind:value={$uiState.nodesLocked}/>
|
||||
<Checkbox label="Disable Interaction" bind:value={$uiState.graphLocked}/> -->
|
||||
<Checkbox label="Auto-Add UI" bind:value={$uiState.autoAddUI}/>
|
||||
<TextBox bind:value={$uiState.subWorkflow} label="Subworkflow" show_label={true} lines={1} max_lines={1}/>
|
||||
<label class="label" for="enable-ui-editing">
|
||||
<BlockTitle>Enable UI Editing</BlockTitle>
|
||||
<select id="enable-ui-editing" name="enable-ui-editing" bind:value={$uiState.uiEditMode}>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
export let name: string = "";
|
||||
let value_: string = ""
|
||||
|
||||
$: value;
|
||||
$: handleChange(value);
|
||||
|
||||
const dispatch = createEventDispatcher<{
|
||||
@@ -16,6 +17,7 @@
|
||||
}>();
|
||||
|
||||
function handleChange(val: string) {
|
||||
console.debug("combo handleChange", val, value_)
|
||||
if (val != value_)
|
||||
dispatch("change", val);
|
||||
value_ = val
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
return spec.name in node.properties
|
||||
}
|
||||
|
||||
function updateAttribute(entry: AttributesSpec, value: any) {
|
||||
function updateAttribute(entry: AttributesSpec, target: IDragItem, value: any) {
|
||||
if (target) {
|
||||
const name = entry.name
|
||||
console.warn("updateAttribute", name, value)
|
||||
@@ -136,15 +136,15 @@
|
||||
{#if spec.type === "string"}
|
||||
<TextBox
|
||||
value={target.attrs[spec.name]}
|
||||
on:change={(e) => updateAttribute(spec, e.detail)}
|
||||
on:input={(e) => updateAttribute(spec, e.detail)}
|
||||
on:change={(e) => updateAttribute(spec, target, e.detail)}
|
||||
on:input={(e) => updateAttribute(spec, target, e.detail)}
|
||||
label={spec.name}
|
||||
max_lines={1}
|
||||
/>
|
||||
{:else if spec.type === "boolean"}
|
||||
<Checkbox
|
||||
value={target.attrs[spec.name]}
|
||||
on:change={(e) => updateAttribute(spec, e.detail)}
|
||||
on:change={(e) => updateAttribute(spec, target, e.detail)}
|
||||
label={spec.name}
|
||||
/>
|
||||
{:else if spec.type === "number"}
|
||||
@@ -152,14 +152,14 @@
|
||||
name={spec.name}
|
||||
value={target.attrs[spec.name]}
|
||||
step={1}
|
||||
on:change={(e) => updateAttribute(spec, e.detail)}
|
||||
on:change={(e) => updateAttribute(spec, target, e.detail)}
|
||||
/>
|
||||
{:else if spec.type === "enum"}
|
||||
<ComfyComboProperty
|
||||
name={spec.name}
|
||||
value={target.attrs[spec.name]}
|
||||
values={spec.values}
|
||||
on:changed={(e) => updateAttribute(spec, e.detail)}
|
||||
on:change={(e) => updateAttribute(spec, target, e.detail)}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -192,7 +192,7 @@
|
||||
name={spec.name}
|
||||
value={node.properties[spec.name]}
|
||||
values={spec.values}
|
||||
on:changed={(e) => updateProperty(spec, e.detail)}
|
||||
on:change={(e) => updateProperty(spec, e.detail)}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -224,7 +224,7 @@
|
||||
name={spec.name}
|
||||
value={getVar(node, spec)}
|
||||
values={spec.values}
|
||||
on:changed={(e) => updateVar(spec, e.detail)}
|
||||
on:change={(e) => updateVar(spec, e.detail)}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -257,7 +257,7 @@
|
||||
name={spec.name}
|
||||
value={$layoutState.attrs[spec.name]}
|
||||
values={spec.values}
|
||||
on:changed={(e) => updateWorkflowAttribute(spec, e.detail)}
|
||||
on:change={(e) => updateWorkflowAttribute(spec, e.detail)}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user