@@ -87,7 +87,7 @@ export default class Resizable extends React.Component {
8787
8888 // If you do this, be careful of constraints
8989 runConstraints ( width : number , height : number ) : [ number , number ] {
90- let [ min , max ] = [ this . props . minConstraints , this . props . maxConstraints ] ;
90+ const [ min , max ] = [ this . props . minConstraints , this . props . maxConstraints ] ;
9191
9292 if ( this . props . lockAspectRatio ) {
9393 const ratio = this . state . width / this . state . height ;
@@ -97,7 +97,7 @@ export default class Resizable extends React.Component {
9797
9898 if ( ! min && ! max ) return [ width , height ] ;
9999
100- let [ oldW , oldH ] = [ width , height ] ;
100+ const [ oldW , oldH ] = [ width , height ] ;
101101
102102 // Add slack to the values used to calculate bound position. This will ensure that if
103103 // we start removing slack, the element won't react to it right away until it's been
@@ -133,16 +133,17 @@ export default class Resizable extends React.Component {
133133 */
134134 resizeHandler ( handlerName : string ) : Function {
135135 return ( e , { node, deltaX, deltaY} : DragCallbackData ) => {
136- let width = this . state . width + deltaX , height = this . state . height + deltaY ;
136+ let width = this . state . width + deltaX ;
137+ let height = this . state . height + deltaY ;
137138
138139 // Early return if no change
139- let widthChanged = width !== this . state . width , heightChanged = height !== this . state . height ;
140+ const widthChanged = width !== this . state . width , heightChanged = height !== this . state . height ;
140141 if ( handlerName === 'onResize' && ! widthChanged && ! heightChanged ) return ;
141142
142143 [ width , height ] = this . runConstraints ( width , height ) ;
143144
144145 // Set the appropriate state for this handler.
145- let newState = { } ;
146+ const newState = { } ;
146147 if ( handlerName === 'onResizeStart' ) {
147148 newState . resizing = true ;
148149 } else if ( handlerName === 'onResizeStop' ) {
0 commit comments