Browse Source

matches entry for correct link color

pull/442/head
EllangoK 2 years ago
parent
commit
6b638c965b
  1. 15
      web/extensions/core/colorPalette.js

15
web/extensions/core/colorPalette.js

@ -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];

Loading…
Cancel
Save