mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 07:00:23 +00:00
Fix collapse and resize (#121)
This commit is contained in:
1
public/litegraph.d.ts
vendored
1
public/litegraph.d.ts
vendored
@@ -965,6 +965,7 @@ export declare class LGraphNode {
|
||||
/** Allows to get onMouseMove and onMouseUp events even if the mouse is out of focus */
|
||||
captureInput(v: any): void;
|
||||
|
||||
get collapsed(): boolean;
|
||||
get collapsible(): boolean;
|
||||
/** Collapse the node to make it smaller on the canvas */
|
||||
collapse(force: boolean): void;
|
||||
|
||||
@@ -2469,6 +2469,11 @@ const globalExport = {};
|
||||
}
|
||||
}
|
||||
|
||||
// Sync the state of this.resizable.
|
||||
if (this.pinned) {
|
||||
this.pin(true);
|
||||
}
|
||||
|
||||
if (this.onConfigure) {
|
||||
this.onConfigure(info);
|
||||
}
|
||||
@@ -4755,8 +4760,12 @@ const globalExport = {};
|
||||
}
|
||||
}
|
||||
|
||||
get collapsed() {
|
||||
return !!this.flags.collapsed;
|
||||
}
|
||||
|
||||
get collapsible() {
|
||||
return !this.pinned && this.constructor.collapsable;
|
||||
return !this.pinned && (this.constructor.collapsable !== false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4765,7 +4774,7 @@ const globalExport = {};
|
||||
**/
|
||||
collapse(force) {
|
||||
this.graph._version++;
|
||||
if (this.collapsible && !force) {
|
||||
if (!this.collapsible && !force) {
|
||||
return;
|
||||
}
|
||||
if (!this.flags.collapsed) {
|
||||
|
||||
Reference in New Issue
Block a user