1.1.1 • Published 8 months ago

flow_fabric v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

flow_fabric

介绍

节点绘制工具; 提供圆形、矩形等节点绘制、拖拽功能;并可利用连接线连接不同节点;

安装教程

  1. npm i flow_fabric
  2. yarn add flow_fabric

使用说明

  1. 引入 flow_fabric
  2. 根据需要引入对应类(class)。
  3. 基本使用:首先引入画布类(NodeCanvas),再引入节点类(Node),在画布中添加对应节点即可 示例:

    import { NodeCanvas, Node } from 'flow_fabric'
    
    // 在对应 canvas 容器中生成画布
    const nodeCanvas = new NodeCanvas("canvas")
    
    // 生成圆形节点
    const node = new Node({
      x: 10,
      y: 10,
      width: 64,
      height: 64,
      text: 'flow_fabric',
      type: 'START',
      elementType: 'round'
    })
    
    // 为画布添加节点
    nodeCanvas.add(node.container)
    
    <canvas
      id="canvas"
      width={500}
      height={500}
    ></canvas>

参与贡献

  1. Fork 本仓库
  2. 新建 feature/xxx 分支
  3. 提交代码
  4. 新建 Pull Request
1.1.1

8 months ago

1.0.2

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.1

11 months ago