mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 14:14:54 +08:00
feat: add Possible(left) + Copy(right) for double-click feature
This commit is contained in:
parent
e75b7938de
commit
e54c4b1f7b
@ -269,6 +269,8 @@ NODE_CLASS_MAPPINGS.update({
|
||||
|
||||
* `Possible Input Connections`: It connects all outputs that match the closest type within the specified range.
|
||||
* This connection links to the closest outputs among the nodes located on the left side of the target node.
|
||||
|
||||
* `Possible(left) + Copy(right)`: When you Double-Click on the left half of the title, it operates as `Possible Input Connections`, and when you Double-Click on the right half, it operates as `Copy All Connections`.
|
||||
|
||||
## Troubleshooting
|
||||
* If your `git.exe` is installed in a specific location other than system git, please install ComfyUI-Manager and run ComfyUI. Then, specify the path including the file name in `git_exe = ` in the ComfyUI-Manager/config.ini file that is generated.
|
||||
|
||||
@ -29,7 +29,7 @@ except:
|
||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
||||
|
||||
|
||||
version = [2, 6]
|
||||
version = [2, 7]
|
||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||
|
||||
|
||||
@ -914,6 +914,7 @@ class ManagerMenuDialog extends ComfyDialog {
|
||||
dbl_click_policy_combo.appendChild($el('option', { value: 'copy-all', text: 'Double-Click: Copy All Connections' }, []));
|
||||
dbl_click_policy_combo.appendChild($el('option', { value: 'copy-input', text: 'Double-Click: Copy Input Connections' }, []));
|
||||
dbl_click_policy_combo.appendChild($el('option', { value: 'possible-input', text: 'Double-Click: Possible Input Connections' }, []));
|
||||
dbl_click_policy_combo.appendChild($el('option', { value: 'dual', text: 'Double-Click: Possible(left) + Copy(right)' }, []));
|
||||
|
||||
api.fetchApi('/manager/dbl_click/policy')
|
||||
.then(response => response.text())
|
||||
|
||||
@ -171,6 +171,25 @@ app.registerExtension({
|
||||
connect_inputs(nearest_inputs, node);
|
||||
}
|
||||
break;
|
||||
case "dual":
|
||||
{
|
||||
if(pos[0] < node.size[0]/2) {
|
||||
// left: possible-input
|
||||
let nearest_inputs = lookup_nearest_inputs(node);
|
||||
if(nearest_inputs)
|
||||
connect_inputs(nearest_inputs, node);
|
||||
}
|
||||
else {
|
||||
// right: copy-all
|
||||
if(node.inputs?.some(x => x.link != null) || node.outputs?.some(x => x.links != null && x.links.length > 0) )
|
||||
return;
|
||||
|
||||
let src_node = lookup_nearest_nodes(node);
|
||||
if(src_node)
|
||||
node_info_copy(src_node, node, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user