File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,11 @@ var ResizableBox = module.exports = React.createClass({
3636 [ width , height ] = this . preserveAspectRatio ( width , height ) ;
3737 }
3838
39- this . setState ( { width, height} ) ;
39+ this . setState ( { width, height} , ( ) => {
40+ if ( this . props . onResize ) {
41+ this . props . onResize ( event , { element, size} ) ;
42+ }
43+ } ) ;
4044 } ,
4145
4246 // If you do this, be careful of constraints
@@ -69,7 +73,9 @@ var ResizableBox = module.exports = React.createClass({
6973 handleSize = { handleSize }
7074 width = { this . state . width }
7175 height = { this . state . height }
76+ onResizeStart = { this . props . onResizeStart }
7277 onResize = { this . onResize }
78+ onResizeStop = { this . props . onResizeStop }
7379 draggableOpts = { this . props . draggableOpts }
7480 >
7581 < div style = { { width : this . state . width + 'px' , height : this . state . height + 'px' } } { ...props } >
You can’t perform that action at this time.
0 commit comments