@@ -44,7 +44,8 @@ export const SpaceInternal : React.FC<AllProps> = React.memo((props) => {
4444 space,
4545 parentContext,
4646 currentContext,
47- currentSize
47+ currentSize,
48+ resizing
4849 } = useSpace ( props , divElementRef ) ;
4950
5051 const handleSize = props . handleSize === undefined ? 5 : props . handleSize ;
@@ -105,6 +106,8 @@ export const SpaceInternal : React.FC<AllProps> = React.memo((props) => {
105106 }
106107 }
107108
109+ parentContext . updateResizing ( true ) ;
110+
108111 var rect = divElementRef . current . getBoundingClientRect ( ) ;
109112 var size = isHorizontalSpace ( props . anchor ) ? rect . width : rect . height ;
110113
@@ -124,14 +127,15 @@ export const SpaceInternal : React.FC<AllProps> = React.memo((props) => {
124127 lastY = e . touches [ 0 ] . pageY ;
125128 e . preventDefault ( ) ;
126129 e . stopImmediatePropagation ( ) ;
127- throttledTouchResize ( lastX , lastY ) ;
130+ throttledTouchResize ( lastX , lastY ) ;
128131 } ;
129132 const removeListener = ( ) => {
130133 if ( moved ) {
131134 touchResize ( lastX , lastY ) ;
132135 }
133136 window . removeEventListener ( 'touchmove' , withPreventDefault ) ;
134137 window . removeEventListener ( 'touchend' , removeListener ) ;
138+ parentContext . updateResizing ( false ) ;
135139 onResizeEnd ( ) ;
136140 } ;
137141 window . addEventListener ( 'touchmove' , withPreventDefault ) ;
@@ -152,6 +156,8 @@ export const SpaceInternal : React.FC<AllProps> = React.memo((props) => {
152156 }
153157 }
154158
159+ parentContext . updateResizing ( true ) ;
160+
155161 var rect = divElementRef . current . getBoundingClientRect ( ) ;
156162 var size = isHorizontalSpace ( props . anchor ) ? rect . width : rect . height ;
157163
@@ -179,6 +185,7 @@ export const SpaceInternal : React.FC<AllProps> = React.memo((props) => {
179185 }
180186 window . removeEventListener ( 'mousemove' , withPreventDefault ) ;
181187 window . removeEventListener ( 'mouseup' , removeListener ) ;
188+ parentContext . updateResizing ( false ) ;
182189 onResizeEnd ( ) ;
183190 } ;
184191 window . addEventListener ( 'mousemove' , withPreventDefault ) ;
@@ -227,7 +234,8 @@ export const SpaceInternal : React.FC<AllProps> = React.memo((props) => {
227234 [
228235 ...[
229236 "spaces-space" ,
230- props . scrollable ? ( resizeHandle ? "scrollable" : "scrollable-a" ) : undefined
237+ props . scrollable ? ( resizeHandle ? "scrollable" : "scrollable-a" ) : undefined ,
238+ resizing ? "spaces-resizing" : undefined
231239 ] ,
232240 ...( resizeHandle && props . scrollable ? userClasses . map ( c => `${ c } -container` ) : userClasses )
233241 ] . filter ( c => c ) ;
0 commit comments