Delete js/data_updater_old.js

This commit is contained in:
Dr. Peter Netz
2025-02-10 19:33:30 +01:00
committed by GitHub
parent 3d0e500288
commit fffc8b7f1e
-25
View File
@@ -1,25 +0,0 @@
import { app } from "../../../scripts/app.js";
import { api } from "../../../scripts/api.js";
app.registerExtension({
name: "zentrocdot.data_updater",
async setup() {
api.addEventListener("zentrocdot.data_updater.node_processed", function (event) {
const nodeId = parseInt(event.detail.node);
const widgetName = event.detail.widget;
const text = event.detail.text;
const node = app.graph.nodes.find(n => n.id === nodeId);
if (!node) {
console.error(`Node to update (#${nodeId}) not found.`);
return;
}
const widget = node.widgets.find(w => w.name === widgetName);
if (!widget) {
console.error(`Widget to update (#${nodeId}:${widgetName}) not found.`);
return;
}
widget.value = text;
});
},
});