From 8a94232f6113b2381678f559fb68cfabe8d96bbc Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Thu, 3 Apr 2025 11:24:51 -0400 Subject: [PATCH] [nit] Remove IDrawOptions.showText (#879) `showText` is essentially an alias of `!lowQuality`. Removing it from the interface. --- src/LGraphNode.ts | 1 - src/NodeSlot.ts | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/LGraphNode.ts b/src/LGraphNode.ts index b6689a227..0fe072f47 100644 --- a/src/LGraphNode.ts +++ b/src/LGraphNode.ts @@ -3551,7 +3551,6 @@ export class LGraphNode implements Positionable, IPinnable, IColorable { colorContext, labelColor, lowQuality, - renderText: !lowQuality, highlight, }) } diff --git a/src/NodeSlot.ts b/src/NodeSlot.ts index bbf2befb6..9b962afab 100644 --- a/src/NodeSlot.ts +++ b/src/NodeSlot.ts @@ -25,7 +25,6 @@ interface IDrawOptions { labelColor?: CanvasColour labelPosition?: LabelPosition lowQuality?: boolean - renderText?: boolean doStroke?: boolean highlight?: boolean } @@ -149,7 +148,6 @@ export abstract class NodeSlot implements INodeSlot { labelColor = "#AAA", labelPosition = LabelPosition.Right, lowQuality = false, - renderText = true, highlight = false, } = options let { doStroke = false } = options @@ -216,7 +214,7 @@ export abstract class NodeSlot implements INodeSlot { if (!lowQuality && doStroke) ctx.stroke() // render slot label - if (renderText) { + if (!lowQuality) { const text = this.renderingLabel if (text) { // TODO: Finish impl. Highlight text on mouseover unless we're connecting links.