diff --git a/__init__.py b/__init__.py index 677078d..b5855a2 100644 --- a/__init__.py +++ b/__init__.py @@ -2,7 +2,7 @@ @author: Crystian @title: Crystools @nickname: Crystools -@version: 1.18.2 +@version: 1.18.3 @project: "https://github.com/crystian/ComfyUI-Crystools", @description: Plugins for multiples uses, mainly for debugging, you need them! IG: https://www.instagram.com/crystian.ia """ diff --git a/core/version.py b/core/version.py index b03ecb2..23fa7e6 100644 --- a/core/version.py +++ b/core/version.py @@ -1 +1 @@ -version = "1.18.2" +version = "1.18.3" diff --git a/pyproject.toml b/pyproject.toml index eba1dd8..98aa9a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-crystools" description = "With this suit, you can see the resources monitor, progress bar & time elapsed, metadata and compare between two images, compare between two JSONs, show any value to console/display, pipes, and more!\nThis provides better nodes to load/save images, previews, etc, and see \"hidden\" data without loading a new workflow." -version = "1.18.2" +version = "1.18.3" license = { file = "LICENSE" } dependencies = ["deepdiff", "torch", "numpy", "Pillow", "pynvml", "py-cpuinfo"] diff --git a/version b/version index b57fc72..b9fb27a 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.18.2 +1.18.3 diff --git a/web/monitor.js b/web/monitor.js index adaaeb0..cd46c14 100644 --- a/web/monitor.js +++ b/web/monitor.js @@ -509,6 +509,12 @@ class CrystoolsMonitor { if (document.getElementById('ProgressBarUI')) { document.getElementById('ProgressBarUI').style.display = 'flex'; } + if (parentElement && this.monitorUI.htmlRoot) { + parentElement.insertAdjacentElement('afterend', this.monitorUI.htmlRoot); + } + else { + console.error('Crystools: parentElement to move monitors not found!', parentElement); + } break; case NewMenuOptions.Top: case NewMenuOptions.Bottom: @@ -516,14 +522,14 @@ class CrystoolsMonitor { document.getElementById('ProgressBarUI').style.display = 'none'; } parentElement = document.getElementsByClassName('comfyui-menu-push')[0]; + if (parentElement && this.monitorUI.htmlRoot) { + parentElement.appendChild(this.monitorUI.htmlRoot); + } + else { + console.error('Crystools: parentElement to move monitors not found!', parentElement); + } break; } - if (parentElement && this.monitorUI.htmlRoot) { - parentElement.insertAdjacentElement('afterend', this.monitorUI.htmlRoot); - } - else { - console.error('Crystools: parentElement to move monitors not found!', parentElement); - } } }); Object.defineProperty(this, "updateAllWidget", { diff --git a/web/monitor.ts b/web/monitor.ts index 3dde734..8a20e59 100644 --- a/web/monitor.ts +++ b/web/monitor.ts @@ -404,6 +404,7 @@ class CrystoolsMonitor { }); }; + // eslint-disable-next-line complexity moveMonitor = (position: NewMenuOptions): void => { let parentElement: Element | null | undefined; @@ -416,7 +417,13 @@ class CrystoolsMonitor { document.getElementById('ProgressBarUI').style.display = 'flex'; } + if (parentElement && this.monitorUI.htmlRoot) { + parentElement.insertAdjacentElement('afterend', this.monitorUI.htmlRoot); + } else { + console.error('Crystools: parentElement to move monitors not found!', parentElement); + } break; + case NewMenuOptions.Top: case NewMenuOptions.Bottom: // TODO remove this @@ -425,17 +432,15 @@ class CrystoolsMonitor { document.getElementById('ProgressBarUI').style.display = 'none'; } parentElement = document.getElementsByClassName('comfyui-menu-push')[0]; + + if (parentElement && this.monitorUI.htmlRoot) { + parentElement.appendChild(this.monitorUI.htmlRoot); + } else { + console.error('Crystools: parentElement to move monitors not found!', parentElement); + } break; } - if (parentElement && this.monitorUI.htmlRoot) { - // console.log('moveMonitor1', parentElement); - // console.log('moveMonitor2', this.monitorUI.htmlRoot); - parentElement.insertAdjacentElement('afterend', this.monitorUI.htmlRoot); - - } else { - console.error('Crystools: parentElement to move monitors not found!', parentElement); - } };