Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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])