Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liuhong1happy/react-raphael-scrawl
so easy! create scrawl with react-raphael.
https://github.com/liuhong1happy/react-raphael-scrawl
react react-raphael react-raphael-scrawl scala
Last synced: 10 days ago
JSON representation
so easy! create scrawl with react-raphael.
- Host: GitHub
- URL: https://github.com/liuhong1happy/react-raphael-scrawl
- Owner: liuhong1happy
- License: mit
- Created: 2016-11-29T13:38:32.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-03T05:49:54.000Z (almost 8 years ago)
- Last Synced: 2024-10-07T08:08:38.597Z (about 1 month ago)
- Topics: react, react-raphael, react-raphael-scrawl, scala
- Language: JavaScript
- Homepage: https://liuhong1happy.github.io/react-raphael-scrawl/
- Size: 91.8 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-raphael-scrawl
[![Version](https://img.shields.io/npm/v/react-raphael-scrawl.svg)](https://www.npmjs.com/package/react-raphael-scrawl)
[![Downloads](https://img.shields.io/npm/dt/react-raphael-scrawl.svg)](https://www.npmjs.com/package/react-raphael-scrawl)so easy! create scrawl with react-raphael.
## Install
# or specify the externals in webpack config
npm install --save raphael
# install react-raphael-scrawl in your react-raphael-scrawl project
npm install --save react-raphael-scrawl
## Quickly Start``` js
var React = require('react');
var ReactDOM = require('react-dom');
var Scrawl = require('react-raphael-scrawl');
class ScrawlApp extends React.Component {
handleClick(){
this.refs.scrawl.clear();
}
render(){
return ()
清除画布
}
}ReactDOM.render(
,document.getElementById("react-container"));
```## API
#### All Scrawl Props
- width `number` width of the canvas
- height `number` height of the canvas
- attr `object` attr of the scrawl path, you can see [http://dmitrybaranovskiy.github.io/raphael/reference.html#Element.attr](http://dmitrybaranovskiy.github.io/raphael/reference.html#Element.attr)#### All Scrawl Ref
- clear `function` clear all scrawl path
## Contact
Email: [[email protected]](mailto:[email protected])