How to use the noflo.json function in noflo

To help you get started, we’ve selected a few noflo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flowhub / the-graph / examples / demo-full.html View on Github external
window.loadGraph = function (json) {
          // Remove loading message
          var loading = document.getElementById("loading");
          loading.parentNode.removeChild(loading);
          // Load graph
          var editor = document.getElementById('editor');
          var graph = json.data ? JSON.parse(json.data.files['noflo.json'].content) : json;
          var graphString = JSON.stringify(graph);
          editor.graph = graph;

          // Attach editor to nav
          var nav = document.getElementById('nav');
          nav.editor = editor;

          // Simulate a library update
          setTimeout(function () {
            var originalComponent = editor.getComponent('core/Split');
            if (!originalComponent) {
              console.warn("Didn't find component. Something is amiss.");
              return;
            }
            var component = JSON.parse(JSON.stringify(originalComponent));
            component.icon = 'github';
github flowhub / the-graph / examples / demo-thumbnail.html View on Github external
window.loadGraph = function (json) {
          // Load graph
          var graphData = json.data.files['noflo.json'].content;
          var thumb = document.getElementById('thumb');
          window.fbpGraph.graph.loadJSON(graphData, function(err, graph) {
            thumb.graph = graph;
          });

        };
        var body = document.querySelector('body');

noflo

Flow-Based Programming environment for JavaScript

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis