From 3a626f4596d33f51f8710a516f6815554578e29d Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sun, 15 Sep 2024 11:00:32 +0900 Subject: [PATCH] Add getter of nodes on LGraphGroup (#145) --- public/litegraph.d.ts | 1 + src/litegraph.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/public/litegraph.d.ts b/public/litegraph.d.ts index 356233fc..16ef84b6 100644 --- a/public/litegraph.d.ts +++ b/public/litegraph.d.ts @@ -1156,6 +1156,7 @@ export declare class LGraphGroup { font_size: number; flags: Record; + get nodes(): LGraphNode[]; get titleHeight(): number; get selected(): boolean; diff --git a/src/litegraph.js b/src/litegraph.js index dd45060b..0e2ac266 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -4901,6 +4901,10 @@ const globalExport = {}; }); } + get nodes() { + return this._nodes; + } + get titleHeight() { return this.font_size * 1.4; }