mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-08 21:54:26 +08:00
fix: connection copying
- don't copy if distance > 1000 - remove dbg message - check nearest node not found
This commit is contained in:
parent
8b3d71fbcf
commit
2f0c7fb2be
@ -29,7 +29,7 @@ except:
|
||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
||||
|
||||
|
||||
version = [2, 4]
|
||||
version = [2, 4, 1]
|
||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ function lookup_nearest_nodes(node) {
|
||||
continue;
|
||||
|
||||
let dist = distance(node, other);
|
||||
if (dist < nearest_distance) {
|
||||
if (dist < nearest_distance && dist < 1000) {
|
||||
nearest_distance = dist;
|
||||
nearest_node = other;
|
||||
}
|
||||
@ -94,9 +94,9 @@ app.registerExtension({
|
||||
if(node.inputs && node.outputs && node.inputs.length == 0 && node.outputs.length == 0)
|
||||
return;
|
||||
|
||||
console.log(arguments);
|
||||
let src_node = lookup_nearest_nodes(node);
|
||||
node_info_copy(src_node, node);
|
||||
if(src_node)
|
||||
node_info_copy(src_node, node);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user