Commit 6b638c96 authored by EllangoK's avatar EllangoK
Browse files

matches entry for correct link color

parent 620c0f93
...@@ -284,7 +284,20 @@ app.registerExtension({ ...@@ -284,7 +284,20 @@ app.registerExtension({
} else { } else {
data = inputNode.outputs[0]; data = inputNode.outputs[0];
} }
let nodeType = data.type;
const matchingEntry = inputNode.outputs.find(output => {
return outputNode.inputs.some(input => input.type === output.type);
});
console.log("matchingEntry: ", matchingEntry)
const inputTypes = inputNode.outputs.map(output => output.type);
console.log("Input types:", inputTypes);
const outputTypes = outputNode.inputs.map(input => input.type);
console.log("Output types:", outputTypes);
let nodeType = matchingEntry.type;
color = "#" + Math.floor(Math.random() * 16777215).toString(16); color = "#" + Math.floor(Math.random() * 16777215).toString(16);
color = colorPalette.colors.node_slot[nodeType]; color = colorPalette.colors.node_slot[nodeType];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment