React-drag-rotate
拖动组件,支持旋转属性
example
npm installnpm starthttp://localhost:3011
安装组件
npm install react-drag-rotate
演示:
<TransRotateCom position= x: 0 y: 0 height: 100 width: 100 rotate: 0 cbActualChange= console cbMouseUp= console/>
API
props
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 |