Fix
This commit is contained in:
@@ -232,17 +232,17 @@ export default class ComfyApp {
|
||||
}
|
||||
|
||||
private addDropHandler() {
|
||||
this.dropZone = document.getElementById("dropzone");
|
||||
// this.dropZone = document.getElementById("dropzone");
|
||||
|
||||
if (this.dropZone) {
|
||||
window.addEventListener('dragenter', this.allowDrag.bind(this));
|
||||
this.dropZone.addEventListener('dragover', this.allowDrag.bind(this));
|
||||
this.dropZone.addEventListener('dragleave', this.hideDropZone.bind(this));
|
||||
this.dropZone.addEventListener('drop', this.handleDrop.bind(this));
|
||||
}
|
||||
else {
|
||||
console.warn("No dropzone detected (probably on mobile).")
|
||||
}
|
||||
// if (this.dropZone) {
|
||||
// window.addEventListener('dragenter', this.allowDrag.bind(this));
|
||||
// this.dropZone.addEventListener('dragover', this.allowDrag.bind(this));
|
||||
// this.dropZone.addEventListener('dragleave', this.hideDropZone.bind(this));
|
||||
// this.dropZone.addEventListener('drop', this.handleDrop.bind(this));
|
||||
// }
|
||||
// else {
|
||||
// console.warn("No dropzone detected (probably on mobile).")
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
for (const cat of Object.values(ALL_ATTRIBUTES)) {
|
||||
for (const spec of Object.values(cat.specs)) {
|
||||
if (spec.location === "widget" && target.attrs[spec.name] == null) {
|
||||
if (!spec.editable)
|
||||
continue;
|
||||
|
||||
if (spec.canShow && !spec.canShow(target))
|
||||
continue;
|
||||
|
||||
@@ -117,7 +120,7 @@
|
||||
}
|
||||
|
||||
function updateAttribute(spec: AttributesSpec, target: IDragItem | null, value: any) {
|
||||
if (target == null)
|
||||
if (target == null || !spec.editable)
|
||||
return;
|
||||
|
||||
const name = spec.name
|
||||
@@ -142,7 +145,7 @@
|
||||
}
|
||||
|
||||
function updateProperty(spec: AttributesSpec, value: any) {
|
||||
if (node == null)
|
||||
if (node == null || !spec.editable)
|
||||
return
|
||||
|
||||
const name = spec.name
|
||||
@@ -170,7 +173,7 @@
|
||||
}
|
||||
|
||||
function updateVar(spec: AttributesSpec, value: any) {
|
||||
if (node == null)
|
||||
if (node == null || !spec.editable)
|
||||
return;
|
||||
|
||||
const name = spec.name
|
||||
@@ -190,8 +193,11 @@
|
||||
$refreshPanel += 1;
|
||||
}
|
||||
|
||||
function updateWorkflowAttribute(entry: AttributesSpec, value: any) {
|
||||
const name = entry.name
|
||||
function updateWorkflowAttribute(spec: AttributesSpec, value: any) {
|
||||
if (!spec.editable)
|
||||
return;
|
||||
|
||||
const name = spec.name
|
||||
console.warn("updateWorkflowAttribute", name, value)
|
||||
|
||||
$layoutState.attrs[name] = value
|
||||
@@ -389,6 +395,11 @@
|
||||
padding: 0.8rem 1.0rem;
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
|
||||
.type {
|
||||
padding-left: 0.25rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,14 @@
|
||||
width: var(--size-12);
|
||||
height: var(--size-12);
|
||||
|
||||
> :global(.lg) {
|
||||
> :global(.secondary.lg) {
|
||||
border: var(--button-border-width) solid var(--neutral-400);
|
||||
}
|
||||
|
||||
> :global(.primary.lg) {
|
||||
border: var(--button-border-width) solid var(--primary-400);
|
||||
}
|
||||
|
||||
&.toggled {
|
||||
:global(svg) {
|
||||
color: var(--button-primary-text-color);
|
||||
|
||||
@@ -20,7 +20,7 @@ const store: WritableUIStateStore = writable(
|
||||
graphLocked: false,
|
||||
nodesLocked: false,
|
||||
autoAddUI: true,
|
||||
uiUnlocked: true,
|
||||
uiUnlocked: false,
|
||||
uiEditMode: "widgets"
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user