TexteaInc / flowviz

easy, elegant and strong expandability diagramming library
MIT License
4 stars 1 forks source link

flowviz Design Concept #1

Open himself65 opened 4 years ago

himself65 commented 4 years ago

we use modern package svg.js to implement our project to convenient users to easy, elegant and strong expandability diagramming library.

// this is just a idea, not the really code example
import { Container, Node, Edge } from '@flowviz/core'
const container = new Container(document.getElementById('root'))
  .addItem(new Node({ width: 10, height: 100 }).text('Hell, world').background('#green').position(10, 40))

container.addEventListener('onSelectItem', items => { /* do something */ })
const item1 = new Node(...)
const item2 = new Node(...)
const edge = new Edge(item1, item2)
container.addItems([items1, item2, edge])
himself65 commented 4 years ago

and it will support for react and vue using functional-component and reactive(on vue-3.0)

we basically split to the three parts of packages: