mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
Merge branch 'master' of https://github.com/jagenjo/litegraph.js
This commit is contained in:
@@ -195,7 +195,7 @@ This is the list of supported widgets:
|
|||||||
|
|
||||||
or if you want to use objects:
|
or if you want to use objects:
|
||||||
|
|
||||||
```this.addWidget("combo","Combo", value1, callback, { values: { "title1":value1, "title2":value2 } );```
|
```this.addWidget("combo","Combo", value1, callback, { values: { "title1":value1, "title2":value2 } } );```
|
||||||
|
|
||||||
* **"text"** to edit a short string
|
* **"text"** to edit a short string
|
||||||
* **"toggle"** like a checkbox
|
* **"toggle"** like a checkbox
|
||||||
|
|||||||
2
src/litegraph.d.ts
vendored
2
src/litegraph.d.ts
vendored
@@ -666,6 +666,8 @@ export declare class LGraphNode {
|
|||||||
toString(): string;
|
toString(): string;
|
||||||
/** get the title string */
|
/** get the title string */
|
||||||
getTitle(): string;
|
getTitle(): string;
|
||||||
|
/** sets the value of a property */
|
||||||
|
setProperty(name: string, value: any): void;
|
||||||
/** sets the output data */
|
/** sets the output data */
|
||||||
setOutputData(slot: number, data: any): void;
|
setOutputData(slot: number, data: any): void;
|
||||||
/** sets the output data */
|
/** sets the output data */
|
||||||
|
|||||||
@@ -1286,11 +1286,11 @@
|
|||||||
var node = column[j];
|
var node = column[j];
|
||||||
node.pos[0] = (layout == LiteGraph.VERTICAL_LAYOUT) ? y : x;
|
node.pos[0] = (layout == LiteGraph.VERTICAL_LAYOUT) ? y : x;
|
||||||
node.pos[1] = (layout == LiteGraph.VERTICAL_LAYOUT) ? x : y;
|
node.pos[1] = (layout == LiteGraph.VERTICAL_LAYOUT) ? x : y;
|
||||||
max_size_index = (layout == LiteGraph.VERTICAL_LAYOUT) ? 1 : 0;
|
var max_size_index = (layout == LiteGraph.VERTICAL_LAYOUT) ? 1 : 0;
|
||||||
if (node.size[max_size_index] > max_size) {
|
if (node.size[max_size_index] > max_size) {
|
||||||
max_size = node.size[max_size_index];
|
max_size = node.size[max_size_index];
|
||||||
}
|
}
|
||||||
node_size_index = (layout == LiteGraph.VERTICAL_LAYOUT) ? 0 : 1;
|
var node_size_index = (layout == LiteGraph.VERTICAL_LAYOUT) ? 0 : 1;
|
||||||
y += node.size[node_size_index] + margin + LiteGraph.NODE_TITLE_HEIGHT;
|
y += node.size[node_size_index] + margin + LiteGraph.NODE_TITLE_HEIGHT;
|
||||||
}
|
}
|
||||||
x += max_size + margin;
|
x += max_size + margin;
|
||||||
@@ -7490,8 +7490,8 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
clientY_rel = e.clientY;
|
clientY_rel = e.clientY;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.deltaX = clientX_rel - this.last_mouse_position[0];
|
// e.deltaX = clientX_rel - this.last_mouse_position[0];
|
||||||
e.deltaY = clientY_rel- this.last_mouse_position[1];
|
// e.deltaY = clientY_rel- this.last_mouse_position[1];
|
||||||
|
|
||||||
this.last_mouse_position[0] = clientX_rel;
|
this.last_mouse_position[0] = clientX_rel;
|
||||||
this.last_mouse_position[1] = clientY_rel;
|
this.last_mouse_position[1] = clientY_rel;
|
||||||
|
|||||||
@@ -1480,7 +1480,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
NodeScript.title = "Script";
|
NodeScript.title = "Script";
|
||||||
NodeScript.desc = "executes a code (max 100 characters)";
|
NodeScript.desc = "executes a code (max 256 characters)";
|
||||||
|
|
||||||
NodeScript.widgets_info = {
|
NodeScript.widgets_info = {
|
||||||
onExecute: { type: "code" }
|
onExecute: { type: "code" }
|
||||||
|
|||||||
Reference in New Issue
Block a user