svgreact

0.2.4 • Public • Published

SVG编辑器。

何时使用

npm install -S svgreact 

API

 
import { Broadcaster, Viewer } from svgreact;
 

Broadcaster && Viewer 共同API

参数 说明 类型 默认值
className 类名 string
width 宽度 number 500
height 高度 number 500
items 笔画 (当为使用Broadcaster组件时,初始化才会render) array
selectItem 当前选择笔画 (当为使用Broadcaster组件时,初始化才会render) object
mouseInfo 鼠标信息 (当为使用Broadcaster组件时,初始化才会render) object
wBToolsInfo 白板工具信息 (当为使用Broadcaster组件时,初始化才会render) object

Broadcaster 私有API

参数 说明 类型 默认值
onWbToolsChange 白板工具回调 function(obj配置信息)
onMouseChange 鼠标回调 function(obj配置信息)
onDrawChange 笔画回调 function(obj配置信息)
onDeleteChange 清除回调 function(obj配置信息)

开发

  1. clone 代码
git clone https://github.com/hexiao-o/SvgEdit.git
  1. 安装依赖和启动服务
cd SvgEdit && npm install && cd example && npm install && npm run start
  1. 打开网页
open http://localhost:3000

Readme

Keywords

none

Package Sidebar

Install

npm i svgreact

Weekly Downloads

1

Version

0.2.4

License

none

Last publish

Collaborators

  • hexiao-o