Browse Source

fix: invalid double-click policy

pull/368/head
Dr.Lt.Data 10 months ago
parent
commit
33dc3a8a30
  1. 2
      __init__.py
  2. 3
      extension-node-map.json
  3. 15
      js/node_fixer.js
  4. 3
      node_db/new/extension-node-map.json

2
__init__.py

@ -29,7 +29,7 @@ except:
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
version = [2, 4, 1]
version = [2, 4, 2]
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
print(f"### Loading: ComfyUI-Manager ({version_str})")

3
extension-node-map.json

@ -54,6 +54,8 @@
"DM_DareClipMerger",
"DM_DareModelMerger",
"DM_DareModelMergerMBW",
"DM_LoRALoaderTags",
"DM_LoRAReporting",
"DM_MagnitudeMasker",
"DM_MaskEdit",
"DM_MaskOperations",
@ -5472,6 +5474,7 @@
"DetailerForEachDebug",
"DetailerForEachDebugPipe",
"DetailerForEachPipe",
"DetailerForEachPipeForAnimateDiff",
"DetailerHookCombine",
"DetailerPipeToBasicPipe",
"EditBasicPipe",

15
js/node_fixer.js

@ -36,16 +36,6 @@ function lookup_nearest_nodes(node) {
return nearest_node;
}
function copy_connections(src, dest) {
if(src.inputs && dest.inputs) {
}
if(src.outputs && dest.outputs) {
}
}
function node_info_copy(src, dest) {
// copy input connections
for(let i in src.inputs) {
@ -91,7 +81,10 @@ app.registerExtension({
let orig_dblClick = node.onDblClick;
node.onDblClick = () => {
orig_dblClick?.apply?.(this, arguments);
if(node.inputs && node.outputs && node.inputs.length == 0 && node.outputs.length == 0)
if(node.inputs?.some(x => x.link != null) || node.outputs?.some(x => x.links != null && x.links.length > 0) )
return;
if(!node.inputs && !node.outputs)
return;
let src_node = lookup_nearest_nodes(node);

3
node_db/new/extension-node-map.json

@ -54,6 +54,8 @@
"DM_DareClipMerger",
"DM_DareModelMerger",
"DM_DareModelMergerMBW",
"DM_LoRALoaderTags",
"DM_LoRAReporting",
"DM_MagnitudeMasker",
"DM_MaskEdit",
"DM_MaskOperations",
@ -5472,6 +5474,7 @@
"DetailerForEachDebug",
"DetailerForEachDebugPipe",
"DetailerForEachPipe",
"DetailerForEachPipeForAnimateDiff",
"DetailerHookCombine",
"DetailerPipeToBasicPipe",
"EditBasicPipe",

Loading…
Cancel
Save