mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-17 02:12:58 +08:00
feat: add Possible(left) + Copy(right) for double-click feature
This commit is contained in:
parent
e75b7938de
commit
e54c4b1f7b
@ -270,6 +270,8 @@ NODE_CLASS_MAPPINGS.update({
|
|||||||
* `Possible Input Connections`: It connects all outputs that match the closest type within the specified range.
|
* `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.
|
* 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
|
## 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.
|
* 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.
|
||||||
* If updating ComfyUI-Manager itself fails, please go to the **ComfyUI-Manager** directory and execute the command `git update-ref refs/remotes/origin/main a361cc1 && git fetch --all && git pull`.
|
* If updating ComfyUI-Manager itself fails, please go to the **ComfyUI-Manager** directory and execute the command `git update-ref refs/remotes/origin/main a361cc1 && git fetch --all && git pull`.
|
||||||
|
|||||||
@ -29,7 +29,7 @@ except:
|
|||||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
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 '')
|
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
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-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: '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: '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')
|
api.fetchApi('/manager/dbl_click/policy')
|
||||||
.then(response => response.text())
|
.then(response => response.text())
|
||||||
|
|||||||
@ -171,6 +171,25 @@ app.registerExtension({
|
|||||||
connect_inputs(nearest_inputs, node);
|
connect_inputs(nearest_inputs, node);
|
||||||
}
|
}
|
||||||
break;
|
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…
Reference in New Issue
Block a user