diff --git a/src/LGraph.ts b/src/LGraph.ts index 2eeaddb39..018424600 100644 --- a/src/LGraph.ts +++ b/src/LGraph.ts @@ -848,8 +848,8 @@ export class LGraph { * @param y The y coordinate in canvas space * @return The group or null */ - getGroupOnPos(x: number, y: number, { margin = 2 } = {}) { - return this._groups.reverse().find(g => g.isPointInside(x, y, margin, /* skip_title */ true)) + getGroupOnPos(x: number, y: number, { margin = 2 } = {}): LGraphGroup | undefined { + return this._groups.toReversed().find(g => g.isPointInside(x, y, margin, true)) } /** diff --git a/tsconfig.json b/tsconfig.json index 4bd301b12..1ab9fa8c9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "target": "ES2022", "useDefineForClassFields": true, "module": "ESNext", - "lib": ["ES2022", "DOM", "DOM.Iterable"], + "lib": ["ES2023", "DOM", "DOM.Iterable"], "skipLibCheck": true, "sourceMap": true, "esModuleInterop": true,