From fd5e8610da167ead93e6dce4a289c25c91abfa7e Mon Sep 17 00:00:00 2001 From: Shan M Date: Sun, 16 Jan 2022 14:26:28 +0300 Subject: [PATCH 1/5] Shouldn't update Event.deltaX as it is read-only property As far as I can tell removing those lines doesn't have any issues. It solves typescripts error for e.deltaX having only getter. --- src/litegraph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/litegraph.js b/src/litegraph.js index 64b6f88c9..3f0afa0a9 100644 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -7481,8 +7481,8 @@ LGraphNode.prototype.executeAction = function(action) clientY_rel = e.clientY; } - e.deltaX = clientX_rel - this.last_mouse_position[0]; - e.deltaY = clientY_rel- this.last_mouse_position[1]; + // e.deltaX = clientX_rel - this.last_mouse_position[0]; + // e.deltaY = clientY_rel- this.last_mouse_position[1]; this.last_mouse_position[0] = clientX_rel; this.last_mouse_position[1] = clientY_rel; From afdebc1dc2c8d7ab53598927edc83cb5f6516b72 Mon Sep 17 00:00:00 2001 From: Olivier Destenay Date: Wed, 28 Sep 2022 23:23:48 +0200 Subject: [PATCH 2/5] Update README.md Just adding a missing "}". --- guides/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/README.md b/guides/README.md index 6eab62ae6..efd2db2cc 100644 --- a/guides/README.md +++ b/guides/README.md @@ -195,7 +195,7 @@ This is the list of supported widgets: 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 * **"toggle"** like a checkbox From 8cc0cd39ffb115a94a3754bc5fd7affa7ce6430f Mon Sep 17 00:00:00 2001 From: Ranuka Perera Date: Mon, 24 Oct 2022 14:31:54 +0530 Subject: [PATCH 3/5] Add setProperty to typescript definition --- src/litegraph.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/litegraph.d.ts b/src/litegraph.d.ts index d3f1d8b69..c9fbe0ced 100644 --- a/src/litegraph.d.ts +++ b/src/litegraph.d.ts @@ -666,6 +666,8 @@ export declare class LGraphNode { toString(): string; /** get the title string */ getTitle(): string; + /** sets the value of a property */ + setProperty(name: string, value: any): void; /** sets the output data */ setOutputData(slot: number, data: any): void; /** sets the output data */ From b1cc66aa3ecb0230f76769e8876ff41e01c36436 Mon Sep 17 00:00:00 2001 From: ClaasJG Date: Thu, 17 Nov 2022 09:45:33 +0100 Subject: [PATCH 4/5] Fix NodeScript description Change the description of NodeScript nodes to contain the correct number of allowed characters. --- src/nodes/base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodes/base.js b/src/nodes/base.js index db31a063b..a8518dbbe 100755 --- a/src/nodes/base.js +++ b/src/nodes/base.js @@ -1480,7 +1480,7 @@ }; NodeScript.title = "Script"; - NodeScript.desc = "executes a code (max 100 characters)"; + NodeScript.desc = "executes a code (max 256 characters)"; NodeScript.widgets_info = { onExecute: { type: "code" } From f6920f4699988e40f01c7c2c71f05015b90f5239 Mon Sep 17 00:00:00 2001 From: astrot1988 Date: Fri, 3 Feb 2023 20:05:32 +0300 Subject: [PATCH 5/5] fix: declare var --- src/litegraph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/litegraph.js b/src/litegraph.js index 3f0afa0a9..693d2413e 100644 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -1286,11 +1286,11 @@ var node = column[j]; node.pos[0] = (layout == LiteGraph.VERTICAL_LAYOUT) ? y : x; 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) { 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; } x += max_size + margin;