下面有一张简单的图表。它是一个具有两个数字输入的math/Add组件,它的输出连接到一个只打印接收到的内容的组件。
我对noflo很陌生,我希望只看到一次start和end事件,但是我却看到了两次。之所以发生这种情况,是因为套接字不止一次被连接和断开。
为什么我看到多个start/end?这是故意的吗?
'use strict';
var noflo = require('noflo');
var graph = noflo.graph.createGraph('test');
graph.addNode('Add', 'math/Add');
graph.addNode('Capture', 'noflotest/CaptureValue');
graph.addEdge('Add', 'sum', 'Capture', 'in');
graph.addInitial(4, 'Add', 'addend');
graph.addInitial(3, 'Add', 'augend');
noflo.createNetwork(graph, function (network) {
network.on('start', function (info) {
console.log('network started', info);
});
network.on('end', function (info) {
console.log('network stopped', info);
});
});发布于 2014-07-10 05:46:43
“找到了,”阿康说。已经创建了一个问题:https://github.com/noflo/noflo/issues/221
https://stackoverflow.com/questions/24522055
复制相似问题