+25
-9
src/Nodes/OSCTrigger.tsx
+25
-9
src/Nodes/OSCTrigger.tsx
···
41
41
}
42
42
}
43
43
44
-
node.outputs.map(output => {
45
-
output.connections.map(partner => {
46
-
partner.connections = partner.connections.filter(x => x != output);
47
-
})
48
-
})
49
-
node.outputs = [];
44
+
let tempOutputs = [];
50
45
51
-
node.outputs.push({
46
+
tempOutputs.push({
52
47
name: 'Flow',
53
48
type: NodeType.Flow,
54
49
connections: [],
···
75
70
}
76
71
77
72
if(type){
78
-
node.outputs.push({
73
+
tempOutputs.push({
79
74
name: dat.desc === '' ? dat.type : dat.desc,
80
75
type: type,
81
76
connections: [],
···
85
80
}
86
81
});
87
82
88
-
node.h = 60 + (parameters.length + 1) * 30;
83
+
let hasChanged = false;
84
+
85
+
for(let i in tempOutputs){
86
+
if(
87
+
node.outputs[i] === undefined ||
88
+
tempOutputs[i].type != node.outputs[i].type
89
+
){
90
+
hasChanged = true;
91
+
}
92
+
}
93
+
94
+
if(hasChanged){
95
+
node.outputs.map(output => {
96
+
output.connections.map(partner => {
97
+
partner.connections = partner.connections.filter(x => x != output);
98
+
})
99
+
})
100
+
101
+
node.outputs = tempOutputs;
102
+
node.h = 60 + (parameters.length + 1) * 30;
103
+
}
104
+
89
105
NodeManager.Instance.UpdateConfig();
90
106
}
91
107
};