拖动组件,支持旋转属性
npm install
npm start
http://localhost:3011
npm install react-drag-rotate
演示:
import TransRotateCom from 'react-drag-rotate'
<TransRotateCom
position={{ x: 0, y: 0, height: 100, width: 100, rotate: 0 }}
cbActualChange={(info) => console.log('cbActualChange', info)}
cbMouseUp={(info) => console.log('cbMouseUp', info)}
/>
Parameter | Description | Type | Default |
---|---|---|---|
position | default position | Object | { x, y, height, width, rotate} |
children | children | Node | null |
isEqualRatio | single line is equal ratio | Bool | false |
cbActualChange | actual change position callback | Func | position |
cbMouseUp | mouse up callback | Func | position |