Skip to content

Commit 441f351

Browse files
committed
add README
1 parent c29f7a4 commit 441f351

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#dragresize
2+
--
3+
A ReactJS component to render a dragresize layer.
4+
###Installation
5+
-----
6+
Install dragresize with [npm](https://www.npmjs.com/):
7+
8+
```
9+
$ npm install dragresize --save
10+
```
11+
12+
For [CommonJS](http://wiki.commonjs.org/wiki/CommonJS) users:
13+
14+
```javascript
15+
import Dragresize from 'dragresize';
16+
```
17+
18+
###Example
19+
-----
20+
21+
npm install;
22+
23+
npm start;
24+
25+
###Props
26+
-----
27+
28+
| Name | Type | default | Description |
29+
| --- | --- | --- | --- |
30+
| `elmX` | `Number` | `10` | **Required.** The layer X axis. |
31+
| `elmY` | `Number` | `10` | **Required.** The layer Y axis. |
32+
| `elmW` | `Number` | `100` | **Required.** The layer width. |
33+
| `elmH` | `Number ` | `150` | **Required.** The layer height. |
34+
| `isDrag` | `Boolean` | `true` | 是否可拖拽. |
35+
| `isResize` | `Boolean ` | `true` | 是否可缩放. |
36+
| `isRatio` | `Boolean ` | `false` | 是否按比例缩放. |
37+
| `isChecked` | `Boolean ` | `true` | 是否选择. |
38+
| `minLeft` | `Number` | `null` | Drag Scope |
39+
| `minTop` | `Number` | `null` | Drag Scope |
40+
| `maxLeft` | `Number ` | `null` | Drag Scope |
41+
| `maxTop` | `Number ` | `null` | Drag Scope |
42+
| `minWidth` | `Number ` | `10` | Resize Scope |
43+
| `minHeight` | `Number ` | `10` | Resize Scope |
44+
| `maxWidth` | `Number ` | `null` | Resize Scope |
45+
| `maxHeight` | `Number ` | `null` | Resize Scope |
46+
| `onMouseDown ` | `Function` | `null` | MouseDown Callback |
47+
| `onMouseMove` | `Function ` | `null` | MouseMove Callback |
48+
| `onResize` | `Function ` | `null` | Resize Callback |

0 commit comments

Comments
 (0)