React draggable component
When you are asked to set a point on a scalable graph, ues it. in this components, Coordinates are in percent
npm install --save @tuya-fe/react-drag-dom| Property | Description | Type | Default |
|---|---|---|---|
| disabled | forbid drag | boolean | false |
| bounds | boundaries of movement,go beyond will trigger triggerBounds |
ReactNode | -- |
| triggerBounds | triggered when out of boundaries | ({x, y}) => {x, Y} | -- |
| offsetParent | assign relative position element | ReactNode | |
| onStart | drag start | function | -- |
| onDrag | -- | function | -- |
| onStop | -- | function | -- |
| onClick | -- | function | -- |
| Property | Description | Type | Default |
|---|---|---|---|
| offsetParent | assign relative position element | ReactNode | |
| bounds | boundaries of movement,go beyond will trigger triggerBounds |
ReactNode | -- |
| triggerBounds | triggered when out of boundaries | ({x, y}) => {x, Y} | -- |
| zoomAble | if resize selected areas | boolean | false |
| onDrawStart | draw start | function | -- |
| onDraw | drawing | function | -- |
| onDrawStop | draw end | function | -- |
| onCancel | complete select | function | -- |
MIT © alowkeyguy
