MCPcopy Create free account
hub / github.com/Comfy-Org/litegraph.js / getGroupOnPos

Method getGroupOnPos

src/LGraph.ts:1056–1058  ·  view source on GitHub ↗

* Returns the top-most group in that position * @param x The x coordinate in canvas space * @param y The y coordinate in canvas space * @returns The group or null

(x: number, y: number)

Source from the content-addressed store, hash-verified

1054 * @returns The group or null
1055 */
1056 getGroupOnPos(x: number, y: number): LGraphGroup | undefined {
1057 return this._groups.toReversed().find(g => g.isPointInside(x, y))
1058 }
1059
1060 /**
1061 * Returns the top-most group with a titlebar in the provided position.

Callers 3

#processPrimaryButtonMethod · 0.80
processMouseMoveMethod · 0.80
processContextMenuMethod · 0.80

Calls 1

isPointInsideMethod · 0.45

Tested by

no test coverage detected