Skip to content

Commit

Permalink
fix closeAllContextMenus in extras_nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekPet committed Jan 19, 2025
1 parent a16cf4b commit a069a52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions ExtrasNode/js/extras_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,14 @@ app.registerExtension({
this.root.preview_content_combo = preview_content_combo;
}

const closeAllContextMenus = LiteGraph.closeAllContextMenus;
const originalCloseAllContextMenus = LiteGraph.closeAllContextMenus;
LiteGraph.closeAllContextMenus = function () {
closeAllContextMenus?.apply(this, arguments);
originalCloseAllContextMenus?.apply(this, arguments);

if (document.querySelector(".preview_content_combo"))
document.querySelector(".preview_content_combo").remove();
const previewCombo = document.querySelector(".preview_content_combo");
if (previewCombo) {
previewCombo.remove();
}
};

const closeItem = LiteGraph.ContextMenu.prototype.close;
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "comfyui_custom_nodes_alekpet"
description = "Nodes: PoseNode, PainterNode, TranslateTextNode, TranslateCLIPTextEncodeNode, DeepTranslatorTextNode, DeepTranslatorCLIPTextEncodeNode, ArgosTranslateTextNode, ArgosTranslateCLIPTextEncodeNode, ChatGLM4TranslateCLIPTextEncodeNode, ChatGLM4TranslateTextNode, ChatGLM4InstructNode, ChatGLM4InstructMediaNode, PreviewTextNode, HexToHueNode, ColorsCorrectNode, IDENode."
version = "1.0.41"
version = "1.0.42"
license = { file = "LICENSE" }

[project.urls]
Expand Down

0 comments on commit a069a52

Please sign in to comment.