flowgraph-editor
View for the flowgraph module
Last updated 5 years ago by finnpauls .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install flowgraph-editor 
SYNC missed versions from official npm registry.

#flowgraph-editor NPM

Editor view for the flowgraph module.

var FlowGraph = require('flowgraph')
var FlowGraphView = require('flowgraph-editor')

var insertCss = require('insert-css')

// define your graph
graph = new FlowGraph()
graph.addNode('A', ['in'], ['out'])
graph.addNode('B') // default ports are in and out
graph.addNode('C', ['1', '2', '3'], ['stdout', 'stderr'])
graph.connect('B', 'C', 'out', '2')

var view = new FlowGraphView(graph)
document.body.appendChild(view.svg)

view.on('node-select', function (node) {
  console.log(node)
})

// insert default css, you can use your own as well
insertCss(FlowGraphView.css)

Current Tags

  • 1.0.2                                ...           latest (5 years ago)

3 Versions

  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |