Support clicking on library entries to toggle expand/insert node (#511)

* Support clicking on library entries to toggle expand/insert node

* Fix type
This commit is contained in:
pythongosssss
2024-08-19 19:09:34 +01:00
committed by GitHub
parent b46036f25d
commit 0dfbcfb2d6
2 changed files with 45 additions and 1 deletions

View File

@@ -2951,6 +2951,11 @@ export class ComfyApp {
([p, o1, o2]) => (p - o2) / this.canvas.ds.scale - o1
) as Vector2
}
getCanvasCenter() {
const [x, y, w, h] = app.canvas.ds.visible_area
return [x + w / 2, y + h / 2]
}
}
export const app = new ComfyApp()