How to use the noflo.Graph 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 d4tocchini / noflo-draggabilly / demo / index.html View on Github external
window.onload = function () {
      
      var noflo = require('noflo');
      var graph = new noflo.Graph('Movable image');

      // Which component to start with when loading components
      graph.baseDir = 'noflo-draggabilly';

      // Logging
      graph.addNode('Log', 'Output');
      graph.addNode('LogSplit', 'Split');
      
      // Container IIP must pass before image! 
      graph.addNode('Touch', 'draggabilly/Draggabilly');
      graph.addNode('Container', 'GetElement');
      graph.addInitial('.area', 'Container', 'selector'); 

      // The image element, selected from DOM with CSS selector
      graph.addNode('Image', 'GetElement');
      graph.addInitial('.area .draggable', 'Image', 'selector');

noflo

Flow-Based Programming environment for JavaScript

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis