react-stretchable
v1.3.3
Published
基于react-draggable的可拖拽拉伸插件
Downloads
20
Readme
react-stretchable
基于react的拖拽缩放插件
View the Demo and its source for more
import Zoomable from 'react-stretchable';
class App extends React.Component {
constructor(props) {
super(props);
}
render() {
const testOption = {
zoomable: {
width: {
min: 200,//default 10 拉伸最小宽度
max: 500//default 1000 拉伸最大宽度
},
height: {
min: 300,//default 10 拉伸最小高度
max: 500//default 500 拉伸最大高度
}
},
onZoomStart: (result) => {
console.log("onZoomStart", result);
},
onZoomEnd: (result) => {
console.log("onZoomEnd", result);
},
onZooming: (result) => {
console.log("onZooming", result);
}
}
return <Zoomable style={{background: "blue"}} {...testOption}>
<div>test</div>
</Zoomable>;
}
};
ReactDOM.render(
<App />,
document.getElementById('Test')
);