mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-12 00:20:15 +00:00
[Refactor] Add LGraphNode.title_mode (#439)
This commit is contained in:
@@ -291,6 +291,10 @@ export class LGraphNode implements Positionable, IPinnable {
|
||||
this.selected = value
|
||||
}
|
||||
|
||||
public get title_mode(): TitleMode {
|
||||
return this.constructor.title_mode ?? TitleMode.NORMAL_TITLE
|
||||
}
|
||||
|
||||
// Used in group node
|
||||
setInnerNodes?(this: LGraphNode, nodes: LGraphNode[]): void
|
||||
|
||||
@@ -1617,7 +1621,7 @@ export class LGraphNode implements Positionable, IPinnable {
|
||||
* @param pad Expands the area by this amount on each side. Default: 0
|
||||
*/
|
||||
measure(out: Rect, pad = 0): void {
|
||||
const titleMode = this.constructor.title_mode
|
||||
const titleMode = this.title_mode
|
||||
const renderTitle =
|
||||
titleMode != TitleMode.TRANSPARENT_TITLE &&
|
||||
titleMode != TitleMode.NO_TITLE
|
||||
|
||||
Reference in New Issue
Block a user