From ad528461c9fbefeff7c2f368145b68623065bec2 Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Thu, 15 May 2025 16:58:46 +1000 Subject: [PATCH] [API] Deprecate node.captureInput (#1049) --- src/LGraphNode.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/LGraphNode.ts b/src/LGraphNode.ts index 843c896ef..53080c6e0 100644 --- a/src/LGraphNode.ts +++ b/src/LGraphNode.ts @@ -43,6 +43,7 @@ import { TitleMode, } from "./types/globalEnums" import { findFreeSlotOfType } from "./utils/collections" +import { warnDeprecated } from "./utils/feedback" import { distributeSpace } from "./utils/spaceDistribution" import { toClass } from "./utils/type" import { BaseWidget } from "./widgets/BaseWidget" @@ -3001,8 +3002,12 @@ export class LGraphNode implements Positionable, IPinnable, IColorable { return img } - /* Allows to get onMouseMove and onMouseUp events even if the mouse is out of focus */ + /** + * Allows to get onMouseMove and onMouseUp events even if the mouse is out of focus + * @deprecated Use {@link LGraphCanvas.pointer} instead. + */ captureInput(v: boolean): void { + warnDeprecated("[DEPRECATED] captureInput will be removed in a future version. Please use LGraphCanvas.pointer (CanvasPointer) instead.") if (!this.graph || !this.graph.list_of_graphcanvas) return const list = this.graph.list_of_graphcanvas