0.1.19 • Published 6 years ago

@slothking-online/slothking-diagram v0.1.19

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

How to use it

Define spacebar menu actions

let allCategories = [{
  name: 'middlewares',
  items: [
    {
      name: 'middleware',
      type: 'middleware',
      inputs: [
        {
          name: ''
        }
      ],
      outputs: [
        {
          name: ''
        }
      ]
    }
  ]
}]
<Graph
  categories={allCategories}
/>

Now if you press spacebar when mouse is on the graph you get this menu, which creates nodes.

Serialization of data

<Graph
  categories={allCategories}
  serialize={(nodes, links) => {
  }}
/>