-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#dragresize | ||
-- | ||
A ReactJS component to render a dragresize layer. | ||
###Installation | ||
----- | ||
Install dragresize with [npm](https://www.npmjs.com/): | ||
|
||
``` | ||
$ npm install dragresize --save | ||
``` | ||
|
||
For [CommonJS](http://wiki.commonjs.org/wiki/CommonJS) users: | ||
|
||
```javascript | ||
import Dragresize from 'dragresize'; | ||
``` | ||
|
||
###Example | ||
----- | ||
|
||
npm install; | ||
|
||
npm start; | ||
|
||
###Props | ||
----- | ||
|
||
| Name | Type | default | Description | | ||
| --- | --- | --- | --- | | ||
| `elmX` | `Number` | `10` | **Required.** The layer X axis. | | ||
| `elmY` | `Number` | `10` | **Required.** The layer Y axis. | | ||
| `elmW` | `Number` | `100` | **Required.** The layer width. | | ||
| `elmH` | `Number ` | `150` | **Required.** The layer height. | | ||
| `isDrag` | `Boolean` | `true` | 是否可拖拽. | | ||
| `isResize` | `Boolean ` | `true` | 是否可缩放. | | ||
| `isRatio` | `Boolean ` | `false` | 是否按比例缩放. | | ||
| `isChecked` | `Boolean ` | `true` | 是否选择. | | ||
| `minLeft` | `Number` | `null` | Drag Scope | | ||
| `minTop` | `Number` | `null` | Drag Scope | | ||
| `maxLeft` | `Number ` | `null` | Drag Scope | | ||
| `maxTop` | `Number ` | `null` | Drag Scope | | ||
| `minWidth` | `Number ` | `10` | Resize Scope | | ||
| `minHeight` | `Number ` | `10` | Resize Scope | | ||
| `maxWidth` | `Number ` | `null` | Resize Scope | | ||
| `maxHeight` | `Number ` | `null` | Resize Scope | | ||
| `onMouseDown ` | `Function` | `null` | MouseDown Callback | | ||
| `onMouseMove` | `Function ` | `null` | MouseMove Callback | | ||
| `onResize` | `Function ` | `null` | Resize Callback | |