* Returns the top-most node in this position of the canvas * @param x the x coordinate in canvas space * @param y the y coordinate in canvas space * @param nodeList a list with all the nodes to search from, by default is all the nodes in the graph * @returns the node at this position or
(
x: number,
y: number,
nodeList?: LGraphNode[],
)
| 1034 | * @returns the node at this position or null |
| 1035 | */ |
| 1036 | getNodeOnPos( |
| 1037 | x: number, |
| 1038 | y: number, |
| 1039 | nodeList?: LGraphNode[], |
| 1040 | ): LGraphNode | null { |
| 1041 | const nodes = nodeList || this._nodes |
| 1042 | let i = nodes.length |
| 1043 | while (--i >= 0) { |
| 1044 | const node = nodes[i] |
| 1045 | if (node.isPointInside(x, y)) return node |
| 1046 | } |
| 1047 | return null |
| 1048 | } |
| 1049 | |
| 1050 | /** |
| 1051 | * Returns the top-most group in that position |
nothing calls this directly
no test coverage detected