From f63a76e41ad27b2c7ac4ce2f1bb06da011172e4f Mon Sep 17 00:00:00 2001 From: Austin Mroz Date: Fri, 19 Sep 2025 10:52:21 -0500 Subject: [PATCH] Repurpose existing graph traversal util --- src/scripts/proxyWidget.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/scripts/proxyWidget.ts b/src/scripts/proxyWidget.ts index 181a45076..6cfe5490e 100644 --- a/src/scripts/proxyWidget.ts +++ b/src/scripts/proxyWidget.ts @@ -8,6 +8,7 @@ import { DOMWidgetImpl } from '@/scripts/domWidget' import { useDomWidgetStore } from '@/stores/domWidgetStore' import { useCanvasStore } from '@/stores/graphStore' import { useNodeOutputStore } from '@/stores/imagePreviewStore' +import { getNodeByExecutionId } from '@/utils/graphTraversalUtil' const originalConfigureAfterSlots = SubgraphNode.prototype._internalConfigureAfterSlots @@ -98,12 +99,8 @@ function resolveLinkedWidget( overlay: Overlay ): [LGraphNode | undefined, IBaseWidget | undefined] { const { graph, nodeId, widgetName } = overlay - let g: LGraph | undefined = graph - let n: LGraphNode | SubgraphNode | undefined = undefined - for (const id of nodeId.split(':')) { - n = g?._nodes_by_id?.[id] - g = n?.isSubgraphNode?.() ? n.subgraph : undefined - } + //Note: This uses partial execution ids and therefore does not pass the root graph + const n = getNodeByExecutionId(graph, nodeId) if (!n) return [undefined, undefined] return [n, n.widgets?.find((w: IBaseWidget) => w.name === widgetName)] }