mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 09:00:05 +00:00
Merge branch 'master' of https://github.com/jagenjo/litegraph.js
This commit is contained in:
6
src/litegraph.d.ts
vendored
6
src/litegraph.d.ts
vendored
@@ -242,7 +242,7 @@ export const LiteGraph: {
|
||||
wrapFunctionAsNode(
|
||||
name: string,
|
||||
func: (...args: any[]) => any,
|
||||
param_types?: [],
|
||||
param_types?: string[],
|
||||
return_type?: string,
|
||||
properties?: object
|
||||
): void;
|
||||
@@ -1216,7 +1216,7 @@ export declare class LGraphCanvas {
|
||||
/** selects a given node (or adds it to the current selection) */
|
||||
selectNode(node: LGraphNode, add?: boolean): void;
|
||||
/** selects several nodes (or adds them to the current selection) */
|
||||
selectNodes(nodes: LGraphNode[], add?: boolean): void;
|
||||
selectNodes(nodes?: LGraphNode[], add?: boolean): void;
|
||||
/** removes a node from the current selection */
|
||||
deselectNode(node: LGraphNode): void;
|
||||
/** removes all nodes from the current selection */
|
||||
@@ -1239,7 +1239,7 @@ export declare class LGraphCanvas {
|
||||
/** draws the front canvas (the one containing all the nodes) */
|
||||
drawFrontCanvas(): void;
|
||||
/** draws some useful stats in the corner of the canvas */
|
||||
renderInfo(): void;
|
||||
renderInfo(ctx: CanvasRenderingContext2D, x: number, y: number): void;
|
||||
/** draws the back canvas (the one containing the background and the connections) */
|
||||
drawBackCanvas(): void;
|
||||
/** draws the given node inside the canvas */
|
||||
|
||||
@@ -1555,7 +1555,7 @@
|
||||
|
||||
/**
|
||||
* Tell this graph it has a global graph input of this type
|
||||
* @method addGlobalInput
|
||||
* @method addInput
|
||||
* @param {String} name
|
||||
* @param {String} type
|
||||
* @param {*} value [optional]
|
||||
@@ -1581,7 +1581,7 @@
|
||||
|
||||
/**
|
||||
* Assign a data to the global graph input
|
||||
* @method setGlobalInputData
|
||||
* @method setInputData
|
||||
* @param {String} name
|
||||
* @param {*} data
|
||||
*/
|
||||
|
||||
@@ -86,10 +86,10 @@
|
||||
this._ws.onmessage = function(e) {
|
||||
that.boxcolor = "#AFA";
|
||||
var data = JSON.parse(e.data);
|
||||
if (data.room && data.room != this.properties.room) {
|
||||
if (data.room && data.room != that.properties.room) {
|
||||
return;
|
||||
}
|
||||
if (e.data.type == 1) {
|
||||
if (data.type == 1) {
|
||||
if (
|
||||
data.data.object_class &&
|
||||
LiteGraph[data.data.object_class]
|
||||
@@ -105,7 +105,7 @@
|
||||
that.triggerSlot(0, data.data);
|
||||
}
|
||||
} else {
|
||||
that._last_received_data[e.data.channel || 0] = data.data;
|
||||
that._last_received_data[data.channel || 0] = data.data;
|
||||
}
|
||||
};
|
||||
this._ws.onerror = function(e) {
|
||||
|
||||
Reference in New Issue
Block a user