diff --git a/src/LiteGraphGlobal.ts b/src/LiteGraphGlobal.ts index a49670e..09034fa 100644 --- a/src/LiteGraphGlobal.ts +++ b/src/LiteGraphGlobal.ts @@ -17,6 +17,7 @@ import { LGraphNode } from "./LGraphNode" import { SlotShape, SlotDirection, SlotType, LabelPosition } from "./draw" import type { Dictionary, ISlotType, Rect } from "./interfaces" import { distance, isInsideRectangle, overlapBounding } from "./measure" +import { Reroute } from "./Reroute" /** * The Global Scope. It contains all the registered node classes. @@ -265,6 +266,7 @@ export class LiteGraphGlobal { LGraphCanvas = LGraphCanvas ContextMenu = ContextMenu CurveEditor = CurveEditor + Reroute = Reroute onNodeTypeRegistered?(type: string, base_class: typeof LGraphNode): void onNodeTypeReplaced?(type: string, base_class: typeof LGraphNode, prev: unknown): void diff --git a/src/litegraph.ts b/src/litegraph.ts index ac1494a..d8435e8 100644 --- a/src/litegraph.ts +++ b/src/litegraph.ts @@ -81,6 +81,7 @@ export type { ISerialisedGraph, } from "./types/serialisation" export { CanvasPointer } from "./CanvasPointer" +export { Reroute } from "./Reroute" export { createBounds } from "./measure" export function clamp(v: number, a: number, b: number): number { diff --git a/test/__snapshots__/litegraph.test.ts.snap b/test/__snapshots__/litegraph.test.ts.snap index 75d1bde..9b6de60 100644 --- a/test/__snapshots__/litegraph.test.ts.snap +++ b/test/__snapshots__/litegraph.test.ts.snap @@ -89,6 +89,7 @@ LiteGraphGlobal { "OUTPUT": 2, "RIGHT": 4, "ROUND_SHAPE": 2, + "Reroute": [Function], "SPLINE_LINK": 2, "STRAIGHT_LINK": 0, "SlotDirection": {