diff --git a/public/red/nodes.js b/public/red/nodes.js index 7d898e964..a54caa295 100644 --- a/public/red/nodes.js +++ b/public/red/nodes.js @@ -236,12 +236,6 @@ RED.nodes = (function() { } } - function refreshValidation() { - for (var n=0;n 0) { @@ -764,10 +751,10 @@ RED.nodes = (function() { n.out.forEach(function(output) { output.wires.forEach(function(wire) { var link; - if (wire.id == n.id) { + if (subflow_map[wire.id] && subflow_map[wire.id].id == n.id) { link = {source:n.in[wire.port], sourcePort:wire.port,target:output}; } else { - link = {source:node_map[wire.id], sourcePort:wire.port,target:output}; + link = {source:node_map[wire.id]||subflow_map[wire.id], sourcePort:wire.port,target:output}; } addLink(link); new_links.push(link); @@ -779,7 +766,7 @@ RED.nodes = (function() { return [new_nodes,new_links,new_workspaces,new_subflows]; } - // TODO: only supports filter.z + // TODO: supports filter.z|type function filterNodes(filter) { var result = []; @@ -788,6 +775,9 @@ RED.nodes = (function() { if (filter.z && node.z !== filter.z) { continue; } + if (filter.type && node.type !== filter.type) { + continue; + } result.push(node); } return result; @@ -903,7 +893,7 @@ RED.nodes = (function() { filterLinks: filterLinks, import: importNodes, - refreshValidation: refreshValidation, + getAllFlowNodes: getAllFlowNodes, createExportableNodeSet: createExportableNodeSet, createCompleteNodeSet: createCompleteNodeSet,