diff --git a/pyproject.toml b/pyproject.toml index f716d8b..9b3d2f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-visualarea-nodes" description = "This is a collection of nodes created to aid when managing area conditionings." -version = "1.0.7" +version = "1.0.8" license = {file = "LICENSE"} [project.urls] diff --git a/web/widgets/graph_widget.js b/web/widgets/graph_widget.js index d225557..f7497bd 100644 --- a/web/widgets/graph_widget.js +++ b/web/widgets/graph_widget.js @@ -120,6 +120,18 @@ export function addAreaGraphWidget(node) { const [x, y, w, h] = getDrawArea(values[node.index]); drawRect(widgetX + x, widgetYOffset + y, w, h, generateHslColor(node.index + 1, values.length, 1.0, 30)); drawRect(widgetX + x + halfBorder, widgetYOffset + y + halfBorder, w - AREA_BORDER_SIZE, h - AREA_BORDER_SIZE, generateHslColor(node.index + 1, values.length)); + if (node.is_selected) { + node.inputs.filter(input => input.name.includes(node.index)).forEach(input => { + const link = input.link; + if (link) { + const nodeId = node.graph.links[link].origin_id; + const connectedNode = node.graph._nodes_by_id[nodeId]; + const [x, y] = connectedNode.pos; + const [w, h] = connectedNode.size; + drawRect(x - node.pos[0], y - node.pos[1], w, h, generateHslColor(node.index + 1, values.length, 0.5)); + } + }); + } } } widget.canvas = document.createElement("canvas");