eliminate import loop

This commit is contained in:
Chris
2025-11-07 14:55:13 +11:00
parent 8bb6cd8bbb
commit d1e26f4900
5 changed files with 20 additions and 22 deletions
+1 -2
View File
@@ -1,9 +1,8 @@
import { i18n_functional } from "./i18n.js";
import { default_priority } from "./ue_properties.js";
import { is_able_to_broadcast } from "./use_everywhere_settings.js";
import { connection_from_output_as_input, visible_graph } from "./use_everywhere_subgraph_utils.js";
import { nodes_in_my_group, nodes_not_in_my_group, nodes_my_color, nodes_not_my_color, nodes_in_groups_matching } from "./use_everywhere_ui.js";
import { Logger, node_is_live, get_real_node, get_connection, find_duplicate_broadcasted_types } from "./use_everywhere_utilities.js";
import { Logger, node_is_live, get_real_node, get_connection, find_duplicate_broadcasted_types, is_able_to_broadcast } from "./use_everywhere_utilities.js";
export function display_name(node) {
+6 -6
View File
@@ -58,14 +58,14 @@ class GraphAnalyser extends Pausable {
return result
}
/*
clean_slots(links, slots) {
slots?.forEach((slot)=>{
if (slot.linkIds.find((lid)=>(!links[lid]))) {
slot.linkIds = slot.linkIds.filter((lid)=>{ return links[lid] !== undefined })
}
})
}*/
}
analyse_graph(graph, ignore_pause) {
if (this.paused() && !ignore_pause) return null
@@ -73,12 +73,12 @@ class GraphAnalyser extends Pausable {
/* work around known bug in ComfyUI front end that doesn't clean up the linkIds
https://github.com/Comfy-Org/ComfyUI_frontend/issues/5673#issuecomment-3314310014
Fixed
https://github.com/Comfy-Org/ComfyUI_frontend/pull/6258
Fixed? Doesn't seems to be.
https://github.com/Comfy-Org/ComfyUI_frontend/pull/6258 */
this.clean_slots(graph.links, graph.inputNode?.slots)
this.clean_slots(graph.links, graph.outputNode?.slots) */
this.clean_slots(graph.links, graph.outputNode?.slots)
this.ambiguities = [];
const treat_bypassed_as_live = settingsCache.getSettingValue("Use Everywhere.Options.connect_to_bypassed") || this.connect_to_bypassed
+1 -11
View File
@@ -1,6 +1,6 @@
import { app } from "../../scripts/app.js";
import { convert_to_links } from "./use_everywhere_apply.js";
import { Logger, is_UEnode, node_can_broadcast } from "./use_everywhere_utilities.js";
import { Logger, is_UEnode, node_can_broadcast, is_able_to_broadcast } from "./use_everywhere_utilities.js";
import { settingsCache } from "./use_everywhere_cache.js";
import { visible_graph } from "./use_everywhere_subgraph_utils.js";
import { edit_restrictions } from "./ue_properties_editor.js";
@@ -187,16 +187,6 @@ function show_broadcasting(submenu_root, node) {
})
}
export function is_able_to_broadcast(node, output_name) {
if (!node.properties.ue_convert) return false
const output = node.outputs.find(i => i.name==output_name);
if (!output) {
Logger.log_error(`Can't find output ${output_name} on node ${node.title}`);
return false;
}
return ! (node.properties?.ue_properties?.output_not_broadcasting?.[output_name])
}
function toggle_broadcasting(node, output_name){
const p = node.properties.ue_properties
p.output_not_broadcasting[output_name] = !!!p.output_not_broadcasting[output_name]
+2 -2
View File
@@ -1,9 +1,9 @@
import { Logger, get_real_node, Pausable, node_can_broadcast } from "./use_everywhere_utilities.js";
import { Logger, get_real_node, Pausable, node_can_broadcast, is_able_to_broadcast } from "./use_everywhere_utilities.js";
import { app } from "../../scripts/app.js";
import { settingsCache } from "./use_everywhere_cache.js";
import { in_visible_graph, visible_graph } from "./use_everywhere_subgraph_utils.js";
import { maybe_show_tooltip } from "./tooltip_window.js";
import { is_able_to_broadcast, is_connectable } from "./use_everywhere_settings.js";
import { is_connectable } from "./use_everywhere_settings.js";
import { shared } from "./shared.js";
import { any_restrictions } from "./ue_properties.js";
+10 -1
View File
@@ -4,7 +4,6 @@ import { link_is_from_subgraph_input, visible_graph, wrap_input, connection_from
import { i18n } from "./i18n.js";
import { ue_callbacks } from "./recursive_callbacks.js";
import { shared } from "./shared.js";
import { is_able_to_broadcast } from "./use_everywhere_settings.js";
export function create( tag, clss, parent, properties ) {
const nd = document.createElement(tag);
@@ -350,6 +349,16 @@ export function get_connection(node, i) {
}
}
export function is_able_to_broadcast(node, output_name) {
if (!node.properties.ue_convert) return false
const output = node.outputs.find(i => i.name==output_name);
if (!output) {
Logger.log_error(`Can't find output ${output_name} on node ${node.title}`);
return false;
}
return ! (node.properties?.ue_properties?.output_not_broadcasting?.[output_name])
}
export function find_duplicate_broadcasted_types(node) {
var the_possibles
var connection_finder