Split LGraphCanvas out to TS file

Fixes circular dependency
This commit is contained in:
filtered
2024-09-25 18:29:47 +10:00
committed by Chenlei Hu
parent 86d232e939
commit 4a109deb8a
5 changed files with 8117 additions and 8065 deletions

View File

@@ -1,5 +1,6 @@
// @ts-nocheck
import { LiteGraph, LGraphCanvas } from "./litegraph";
import { LiteGraph } from "./litegraph";
import { LGraphCanvas } from "./LGraphCanvas";
import { LGraphGroup } from "./LGraphGroup";
import { LGraphNode } from "./LGraphNode";
import { LLink } from "./LLink";

8108
src/LGraphCanvas.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
// @ts-nocheck
import { LiteGraph, LGraphCanvas } from "./litegraph";
import { LiteGraph } from "./litegraph";
import { LGraphCanvas } from "./LGraphCanvas";
import { overlapBounding } from "./LiteGraphGlobal";

View File

@@ -50,6 +50,8 @@ export class LiteGraphGlobal {
WIDGET_SECONDARY_TEXT_COLOR = "#999";
LINK_COLOR = "#9A9";
// TODO: This is a workaround until LGraphCanvas.link_type_colors is no longer static.
static DEFAULT_EVENT_LINK_COLOR = "#A86";
EVENT_LINK_COLOR = "#A86";
CONNECTING_LINK_COLOR = "#AFA";

File diff suppressed because it is too large Load Diff