mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
Fix group order unexpectedly reversing (#242)
This commit is contained in:
@@ -848,8 +848,8 @@ export class LGraph {
|
|||||||
* @param y The y coordinate in canvas space
|
* @param y The y coordinate in canvas space
|
||||||
* @return The group or null
|
* @return The group or null
|
||||||
*/
|
*/
|
||||||
getGroupOnPos(x: number, y: number, { margin = 2 } = {}) {
|
getGroupOnPos(x: number, y: number, { margin = 2 } = {}): LGraphGroup | undefined {
|
||||||
return this._groups.reverse().find(g => g.isPointInside(x, y, margin, /* skip_title */ true))
|
return this._groups.toReversed().find(g => g.isPointInside(x, y, margin, true))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user