Use npm to manage litegraph dependency (#45)

* Add comfyui-litegraph dep

* remove static copy

* Remove litegraph impl

* Fix various issues

* LiteGraph import

* Fix test ref issue

* Change to stable version of litegraph

* update README
This commit is contained in:
Chenlei Hu
2024-06-19 23:08:43 -04:00
committed by GitHub
parent cd7fac3fd5
commit 4640eaf0ac
31 changed files with 45 additions and 16985 deletions

View File

@@ -1,5 +1,4 @@
// @ts-check
/// <reference path="../../src/types/litegraph.d.ts" />
import type { LiteGraph, LGraphCanvas } from "comfyui-litegraph";
/**
* @typedef { import("./src/scripts/app")["app"] } app
@@ -403,12 +402,12 @@ export const Ez = {
* console.log(saveNode);
* graph.arrange();
* @param { app } app
* @param { boolean } clearGraph
* @param { LG["LiteGraph"] } LiteGraph
* @param { LG["LGraphCanvas"] } LGraphCanvas
* @param { boolean } clearGraph
* @returns { { graph: EzGraph, ez: Record<string, EzNodeFactory> } }
*/
graph(app, LiteGraph = window["LiteGraph"], LGraphCanvas = window["LGraphCanvas"], clearGraph = true) {
graph(app, LiteGraph, LGraphCanvas, clearGraph = true) {
// Always set the active canvas so things work
LGraphCanvas.active_canvas = app.canvas;