mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 06:04:31 +08:00
fix: Restrict double click action to the title area.
https://github.com/ltdrdata/ComfyUI-Manager/issues/370
This commit is contained in:
parent
048f44f105
commit
b1f613e649
@ -257,7 +257,7 @@ NODE_CLASS_MAPPINGS.update({
|
||||
## Additional Feature
|
||||
* Fix node(recreate): When right-clicking on a node and selecting `Fix node (recreate)`, you can recreate the node. The widget's values are reset, while the connections maintain those with the same names.
|
||||
* It is used to correct errors in nodes of old workflows created before, which are incompatible with the version changes of custom nodes.
|
||||
* Double-Click: You can set the double click behavior of nodes in the ComfyUI-Manager menu.
|
||||
* Double-Click Node Title: You can set the double click behavior of nodes in the ComfyUI-Manager menu.
|
||||
* `Copy All Connections`, `Copy Input Connections`: Double-clicking a node copies the connections of the nearest node.
|
||||
* This action targets the nearest node within a straight-line distance of 1000 pixels from the center of the node.
|
||||
* In the case of `Copy All Connections`, it duplicates existing outputs, but since it does not allow duplicate connections, the existing output connections of the original node are disconnected.
|
||||
|
||||
@ -29,7 +29,7 @@ except:
|
||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
||||
|
||||
|
||||
version = [2, 5]
|
||||
version = [2, 5, 1]
|
||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||
|
||||
|
||||
@ -146,10 +146,10 @@ app.registerExtension({
|
||||
|
||||
async nodeCreated(node, app) {
|
||||
let orig_dblClick = node.onDblClick;
|
||||
node.onDblClick = () => {
|
||||
node.onDblClick = function (e, pos, self) {
|
||||
orig_dblClick?.apply?.(this, arguments);
|
||||
|
||||
if(!node.inputs && !node.outputs)
|
||||
if((!node.inputs && !node.outputs) || pos[1] > 0)
|
||||
return;
|
||||
|
||||
switch(double_click_policy) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user