diff --git a/js/ttN.js b/js/ttN.js index 2d48377..c9aaca8 100644 --- a/js/ttN.js +++ b/js/ttN.js @@ -656,7 +656,7 @@ app.registerExtension({ } }, nodeCreated(node) { - if (["pipeLoader", "pipeLoaderSDXL"].includes(node.getTitle())) { + if (["pipeLoader", "pipeLoaderSDXL"].includes(node.constructor.title)) { for (let widget of node.widgets) { if (widget.name === "control_after_generate") { widget.value = "fixed" diff --git a/js/ttNdynamicWidgets.js b/js/ttNdynamicWidgets.js index 9a0591d..cdca22f 100644 --- a/js/ttNdynamicWidgets.js +++ b/js/ttNdynamicWidgets.js @@ -8,6 +8,7 @@ const doesInputWithNameExist = (node, name) => node.inputs ? node.inputs.some((i function updateNodeHeight(node) { node.setSize([node.size[0], node.computeSize()[1]]); + app.canvas.dirty_canvas = true; } function toggleWidget(node, widget, show = false, suffix = "") { @@ -310,7 +311,7 @@ function widgetLogic(node, widget) { break; case 'mode': - if (node.getTitle() === "pipeLoraStack") { + if (node.constructor.title === "pipeLoraStack") { let number_to_show2 = findWidgetByName(node, 'num_loras')?.value + 1 for (let i = 0; i < number_to_show2; i++) { if (widget.value === "simple") { @@ -324,7 +325,7 @@ function widgetLogic(node, widget) { } updateNodeHeight(node) break; - } else { + } else if (node.constructor.title === "advPlot combo") { if (widget.value === 'all') { toggleWidget(node, findWidgetByName(node, 'start_from')) toggleWidget(node, findWidgetByName(node, 'end_with')) @@ -525,7 +526,7 @@ app.registerExtension({ name: "comfy.ttN.dynamicWidgets", nodeCreated(node) { - const nodeTitle = node.getTitle(); + const nodeTitle = node.constructor.title; if (getSetTitles.includes(nodeTitle)) { getSetters(node); } diff --git a/js/ttNembedAC.js b/js/ttNembedAC.js index 39829b9..fd35025 100644 --- a/js/ttNembedAC.js +++ b/js/ttNembedAC.js @@ -280,7 +280,7 @@ app.registerExtension({ _initializeAutocompleteList(nsp_keys, '__'); }, nodeCreated(node) { - if (node.widgets && node.getTitle() !== "xyPlot") { + if (node.widgets && !["xyPlot", "advanced xyPlot"].includes(node.constructor.title)) { const relevantWidgets = node.widgets.filter(_isRelevantWidget); relevantWidgets.forEach(_attachInputHandler); const lorasWidgets = node.widgets.filter(_isLorasWidget); diff --git a/js/ttNxyPlot.js b/js/ttNxyPlot.js index b635532..cd73e06 100644 --- a/js/ttNxyPlot.js +++ b/js/ttNxyPlot.js @@ -203,7 +203,7 @@ app.registerExtension({ } }, nodeCreated(node) { - if (node.getTitle() === "xyPlot") { + if (node.constructor.title === "xyPlot") { addGetSetters(node); dropdownCreator(node); diff --git a/js/ttNxyPlotAdv.js b/js/ttNxyPlotAdv.js index ed3e61d..a217e4e 100644 --- a/js/ttNxyPlotAdv.js +++ b/js/ttNxyPlotAdv.js @@ -12,7 +12,7 @@ function getWidgetsOptions(node) { const current_value = w.value if (widgets_to_ignore.includes(w.name)) continue //console.log(`WIDGET ${w.name}, ${w.type}, ${w.options}`) - if (w.name === 'seed' || (w.name === 'value' && node.getTitle().toLowerCase() == 'seed')) { + if (w.name === 'seed' || (w.name === 'value' && node.constructor.title.toLowerCase() == 'seed')) { widgetsOptions[w.name] = {'Random Seed': `${w.options.max}/${w.options.min}/${w.options.step}`} continue } @@ -106,7 +106,7 @@ function getNodesWidgetsDict(xyNode, plotLines=false) { const plotNodeLink = xyNodeLinks[0] const plotNodeID = xyNode.graph.links[plotNodeLink].target_id - const plotNodeTitle = xyNode.graph._nodes_by_id[plotNodeID].getTitle() + const plotNodeTitle = xyNode.graph._nodes_by_id[plotNodeID].constructor.title const plotNode = app.graph._nodes_by_id[plotNodeID] const options = getWidgetsOptions(plotNode) @@ -117,8 +117,8 @@ function getNodesWidgetsDict(xyNode, plotLines=false) { const inputIDS = _recursiveGetInputIDs(plotNode) for (const iID of inputIDS) { const iNode = app.graph._nodes_by_id[iID]; - const iNodeTitle = iNode.getTitle() - if (iNode.type === 'ttN advanced xyPlot') { + const iNodeTitle = iNode.constructor.title + if (iNodeTitle === 'advanced xyPlot') { continue } const options = getWidgetsOptions(iNode) @@ -258,7 +258,7 @@ function findUpstreamXYPlot(targetID) { if (!currentNode) { return } - if (currentNode.getTitle() === 'advanced xyPlot') { + if (currentNode.constructor.title === 'advanced xyPlot') { return currentNode; } else { if (!currentNode.outputs) { @@ -478,7 +478,7 @@ app.registerExtension({ }*/ }, nodeCreated(node) { - const node_title = node.getTitle(); + const node_title = node.constructor.title; if (node_title === "advanced xyPlot") { dropdownCreator(node);