This commit is contained in:
tamat
2020-04-21 12:35:09 +02:00
3 changed files with 8 additions and 8 deletions

6
src/litegraph.d.ts vendored
View File

@@ -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 */

View File

@@ -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
*/

View File

@@ -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) {