diff --git a/.gitignore b/.gitignore index 282757f..9c5b28a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ __pycache__/ # Distribution / packaging .Python +Web/archive build/ develop-eggs/ dist/ diff --git a/Web/utils.js b/Web/utils.js deleted file mode 100644 index 1bda889..0000000 --- a/Web/utils.js +++ /dev/null @@ -1,35 +0,0 @@ -//utils.js -console.log("utils.js loaded"); -import {app} from "../../scripts/app.js"; -import {ComfyWidgets} from "../../scripts/widgets.js"; - -// Create a read-only string widget -export function createTextWidget(app, node, widgetName, styles = {}) { - const widget = ComfyWidgets["STRING"](node, widgetName, ["STRING", {multiline: true}], app).widget; - widget.inputEl.readOnly = true; - Object.assign(widget.inputEl.style, styles); - return widget; -} - - -// Create a custom HTML widget using addDOMWidget for proper integration -export function createHTMLWidget(node, widgetName, styles = {}) { - console.log("Creating HTML widget container..."); - const container = document.createElement('div'); - container.style.width = '100%'; - container.style.height = 'auto'; - container.style.overflowY = 'auto'; - - Object.assign(container.style, styles); - - return { - name: widgetName, - type: 'html', - widget: container, - onResize: function (width, height) { - container.style.width = width + 'px'; - container.style.height = height + 'px'; - console.log("Resizing HTML widget:", width, height); - }, - }; -} \ No newline at end of file