fix hound

This commit is contained in:
Ondřej Samohel 2020-10-27 18:11:08 +01:00
parent 1b69c712f1
commit 953df90e66
No known key found for this signature in database
GPG key ID: 8A29C663C672C2B7

View file

@ -107,13 +107,14 @@ TemplateLoader.prototype.replaceNode = function(
}
}
var inLinks = dstNode.getInLinks();
var link, inNode, inPort, outPort, outNode, success;
for (var l in inLinks) {
if (Object.prototype.hasOwnProperty.call(inLinks, l)) {
var link = inLinks[l];
var inPort = Number(link.inPort);
var outPort = Number(link.outPort);
var outNode = link.outNode;
var success = replacementNode.linkInNode(outNode, inPort, outPort);
link = inLinks[l];
inPort = Number(link.inPort);
outPort = Number(link.outPort);
outNode = link.outNode;
success = replacementNode.linkInNode(outNode, inPort, outPort);
if (success) {
$.log('Successfully connected ' + outNode + ' : ' +
outPort + ' -> ' + replacementNode + ' : ' + inPort);
@ -130,7 +131,7 @@ TemplateLoader.prototype.replaceNode = function(
link = outLinks[l];
inPort = Number(link.inPort);
outPort = Number(link.outPort);
var inNode = link.inNode;
inNode = link.inNode;
// first we must disconnect the port from the node being
// replaced to this links inNode port
inNode.unlinkInPort(inPort);