Skip to content

Statfine/react-drag-rotate

Repository files navigation

React-drag-rotate

npm downloads

拖动组件,支持旋转属性

example

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)}
/>

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

Releases

No releases published

Packages

No packages published