Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
graph.addEdge('Touch', 'end', 'DragY', 'close');
graph.addEdge('DragY', 'out', 'PosY', 'in');
// up-down axis return when touch ends
graph.addEdge('AnchorY', 'out', 'SpringY', 'anchor');
graph.addEdge('Touch', 'moveY', 'NewY', 'data');
graph.addEdge('Touch', 'end', 'NewY', 'in');
graph.addEdge('NewY', 'out', 'SpringY', 'in');
graph.addEdge('SpringY', 'out', 'PosY', 'in');
// write graph JSON to textarea
var g = document.getElementById('graph');
g.value = JSON.stringify(graph.toJSON(), null, 2);
// run the graph
noflo.createNetwork(graph, function (network) {
console.log("Network created");
});
};
dataflow.plugins.noflo.registerGraph(graph, dataflow, function (dfGraph) {
// Run the graph
noflo.createNetwork(graph, function (network) {
graph.on('addInitial', function () {
network.sendInitials();
});
});
});
});
dataflow.plugins.noflo.registerGraph(nfGraph, dataflow, function(dfGraph){
// Run the graph
noflo.createNetwork(nfGraph, function (network) {
nfGraph.on('addInitial', function () {
network.sendInitials();
});
});
// Show source
nfGraph.dataflowGraph.trigger("change");
}, true);
};
noflo.graph.loadJSON(graphDefinition, function (graph) {
window.graph = graph;
// Which component to start with when loading components
graph.baseDir = '/dataflow-noflo';
var dataflow = new Dataflow({appendTo:"#noflo-ui"});
// Dataflow-Noflo connection
dataflow.plugins.noflo.registerGraph(graph, dataflow);
// Run the graph
noflo.createNetwork(graph, function (network) {
graph.on('addInitial', function () {
network.sendInitials();
});
});
});
});