mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 18:10:08 +00:00
Remove LGraphNode.subgraph (Legacy subgraph) (#453)
* Remove LGraphNode.subgraph (Legacy subgraph) * Update snapshot
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user