diff --git a/src/DragAndScale.ts b/src/DragAndScale.ts index 09c42255af..02516abd8e 100644 --- a/src/DragAndScale.ts +++ b/src/DragAndScale.ts @@ -3,7 +3,12 @@ import type { Point, ReadOnlyRect, Rect, Rect32 } from "./interfaces" import { EaseFunction } from "./litegraph" export interface DragAndScaleState { + /** + * The offset from the top-left of the current canvas viewport to `[0, 0]` in graph space. + * Or said another way, the inverse offset of the viewport. + */ offset: Point + /** The scale of the graph. */ scale: number } diff --git a/src/utils/uuid.ts b/src/utils/uuid.ts index 157813e432..0a907a5860 100644 --- a/src/utils/uuid.ts +++ b/src/utils/uuid.ts @@ -1,4 +1,5 @@ -export type UUID = `${string}-${string}-${string}-${string}-${string}` +// Using a template string for this is resulting in complex type workarounds. No current benefit beyond dev reading. +export type UUID = string /** Special-case zero-UUID, consisting entirely of zeros. Used as a default value. */ export const zeroUuid = "00000000-0000-0000-0000-000000000000"