[nit] Remove IDrawOptions.showText (#879)

`showText` is essentially an alias of `!lowQuality`. Removing it from
the interface.
This commit is contained in:
Chenlei Hu
2025-04-03 11:24:51 -04:00
committed by GitHub
parent 05b0918915
commit 8a94232f61
2 changed files with 1 additions and 4 deletions

View File

@@ -3551,7 +3551,6 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
colorContext,
labelColor,
lowQuality,
renderText: !lowQuality,
highlight,
})
}

View File

@@ -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.