|
@@ -111,7 +111,7 @@ export default class ScriptNodeInfo extends React.Component<any, any> {
|
|
|
return item.group === 'top' ? pre + 1 : pre;
|
|
|
}, 0);
|
|
|
for (let i = number; i < currentInputPortsNumber; i++) {
|
|
|
- node.removePort(`input${number}`);
|
|
|
+ node.removePort(`input${i}`);
|
|
|
}
|
|
|
for (let i = currentInputPortsNumber; i < number; i++) {
|
|
|
node.addPort({ group: 'top', id: `input${i}` });
|
|
@@ -124,7 +124,6 @@ export default class ScriptNodeInfo extends React.Component<any, any> {
|
|
|
};
|
|
|
|
|
|
updateOutputNumber = (outputNumber: number) => {
|
|
|
- console.log(outputNumber);
|
|
|
this.setState({ outputNumber });
|
|
|
};
|
|
|
|
|
@@ -137,7 +136,7 @@ export default class ScriptNodeInfo extends React.Component<any, any> {
|
|
|
return item.group === 'bottom' ? pre + 1 : pre;
|
|
|
}, 0);
|
|
|
for (let i = number; i < currentOutputPortsNumber; i++) {
|
|
|
- node.removePort(`r${number}`);
|
|
|
+ node.removePort(`r${i}`);
|
|
|
}
|
|
|
for (let i = currentOutputPortsNumber; i < number; i++) {
|
|
|
node.addPort({ group: 'bottom', id: `r${i}` });
|