@@ -10,7 +10,8 @@ const Draggable = (props) => {
1010
1111
1212 const [ currHeight , setHeigth ] = React . useState ( "30rem" ) ;
13- const [ currWidth , setWidth ] = React . useState ( "40rem" ) ;
13+ const [ currWidth , setWidth ] = React . useState ( "40rem" ) ;
14+
1415
1516 const currState = React . useRef ( state ) ;
1617
@@ -260,7 +261,7 @@ const Draggable = (props) => {
260261 }
261262
262263 function doDrag ( e ) {
263- if ( startWidth + e . clientX - startX > 480 ) {
264+ if ( startWidth + e . clientX - startX > 280 ) {
264265 elem . style . width = startWidth + e . clientX - startX + "px" ;
265266 setWidth ( elem . style . width ) ;
266267 }
@@ -271,7 +272,7 @@ const Draggable = (props) => {
271272 }
272273
273274 function doDragMinusBoth ( e ) {
274- if ( startWidth + e . clientX - startX > 480 ) {
275+ if ( startWidth + e . clientX - startX > 280 ) {
275276 elem . style . width = startWidth - e . clientX + startX + "px" ;
276277 setWidth ( elem . style . width ) ;
277278 }
@@ -287,7 +288,7 @@ const Draggable = (props) => {
287288 if ( startWidth - e . clientX + startX !== elem . style . minWidth ) {
288289 elem . style . left = e . clientX + "px" ;
289290 }
290- if ( startWidth + e . clientX - startX > 480 ) {
291+ if ( startWidth + e . clientX - startX > 280 ) {
291292 elem . style . width = startWidth - e . clientX + startX + "px" ;
292293 setWidth ( elem . style . width ) ;
293294 }
@@ -297,7 +298,7 @@ const Draggable = (props) => {
297298 }
298299 }
299300 function doDragMinusTop ( e ) {
300- if ( startWidth + e . clientX - startX > 480 ) {
301+ if ( startWidth + e . clientX - startX > 280 ) {
301302 elem . style . width = startWidth - e . clientX + startX + "px" ;
302303 setWidth ( elem . style . width ) ;
303304 }
0 commit comments