Remove LGraphNode.subgraph (Legacy subgraph) (#453)

* Remove LGraphNode.subgraph (Legacy subgraph)

* Update snapshot
This commit is contained in:
Chenlei Hu
2025-02-03 20:27:11 -08:00
committed by GitHub
parent 047bf68dc9
commit b3dbc41368
3 changed files with 0 additions and 46 deletions

View File

@@ -5340,38 +5340,6 @@ export class LGraphCanvas {
}
}
// subgraph box
if (
!collapsed &&
node.subgraph &&
!node.skip_subgraph_button
) {
const w = LiteGraph.NODE_TITLE_HEIGHT
const x = node.size[0] - w
const over = LiteGraph.isInsideRectangle(
this.graph_mouse[0] - node.pos[0],
this.graph_mouse[1] - node.pos[1],
x + 2,
-w + 2,
w - 4,
w - 4,
)
ctx.fillStyle = over ? "#888" : "#555"
if (shape == RenderShape.BOX || low_quality) {
ctx.fillRect(x + 2, -w + 2, w - 4, w - 4)
} else {
ctx.beginPath()
ctx.roundRect(x + 2, -w + 2, w - 4, w - 4, [4])
ctx.fill()
}
ctx.fillStyle = "#333"
ctx.beginPath()
ctx.moveTo(x + w * 0.2, -w * 0.6)
ctx.lineTo(x + w * 0.8, -w * 0.6)
ctx.lineTo(x + w * 0.5, -w * 0.3)
ctx.fill()
}
// custom title render
node.onDrawTitle?.(ctx)
}

View File

@@ -230,8 +230,6 @@ export class LGraphNode implements Positionable, IPinnable {
console?: string[]
_level: number
_shape?: RenderShape
subgraph?: LGraph
skip_subgraph_button?: boolean
mouseOver?: IMouseOverData
redraw_on_mouse?: boolean
// Appears unused

View File

@@ -96,8 +96,6 @@ LGraph {
"selected": undefined,
"serialize_widgets": undefined,
"showAdvanced": undefined,
"skip_subgraph_button": undefined,
"subgraph": undefined,
"title": undefined,
"type": null,
"widgets": undefined,
@@ -166,8 +164,6 @@ LGraph {
"selected": undefined,
"serialize_widgets": undefined,
"showAdvanced": undefined,
"skip_subgraph_button": undefined,
"subgraph": undefined,
"title": undefined,
"type": null,
"widgets": undefined,
@@ -237,8 +233,6 @@ LGraph {
"selected": undefined,
"serialize_widgets": undefined,
"showAdvanced": undefined,
"skip_subgraph_button": undefined,
"subgraph": undefined,
"title": undefined,
"type": null,
"widgets": undefined,
@@ -424,8 +418,6 @@ LGraph {
"selected": undefined,
"serialize_widgets": undefined,
"showAdvanced": undefined,
"skip_subgraph_button": undefined,
"subgraph": undefined,
"title": undefined,
"type": null,
"widgets": undefined,
@@ -494,8 +486,6 @@ LGraph {
"selected": undefined,
"serialize_widgets": undefined,
"showAdvanced": undefined,
"skip_subgraph_button": undefined,
"subgraph": undefined,
"title": undefined,
"type": null,
"widgets": undefined,
@@ -565,8 +555,6 @@ LGraph {
"selected": undefined,
"serialize_widgets": undefined,
"showAdvanced": undefined,
"skip_subgraph_button": undefined,
"subgraph": undefined,
"title": undefined,
"type": null,
"widgets": undefined,