@@ -91,10 +91,6 @@ export function styleDefinition(space: ISpaceDefinition) {
91
91
92
92
const cssString : string [ ] = [ ] ;
93
93
94
- if ( space . scrollable ) {
95
- cssString . push ( `overflow: auto;` ) ;
96
- cssString . push ( `touch-action: auto;` ) ;
97
- }
98
94
if ( style . position ) {
99
95
cssString . push ( `position: ${ style . position } ;` ) ;
100
96
}
@@ -124,11 +120,14 @@ export function styleDefinition(space: ISpaceDefinition) {
124
120
cssElements . push ( `#${ space . id } { ${ cssString . join ( " " ) } }` ) ;
125
121
}
126
122
123
+ if ( space . scrollable ) {
124
+ cssElements . push ( `#${ space . id } > .spaces-space-inner { overflow: auto; touch-action: auto; }` ) ;
125
+ }
126
+
127
127
let handleOffset = 0 ;
128
- const touchHandleSize = ( space . touchHandleSize / 2 ) - ( space . handleSize / 2 ) ;
128
+ const touchHandleSize = space . touchHandleSize / 2 - space . handleSize / 2 ;
129
129
130
- switch ( space . handlePlacement )
131
- {
130
+ switch ( space . handlePlacement ) {
132
131
case ResizeHandlePlacement . Inside :
133
132
case ResizeHandlePlacement . OverlayInside :
134
133
handleOffset = space . handleSize ;
@@ -139,22 +138,34 @@ export function styleDefinition(space: ISpaceDefinition) {
139
138
}
140
139
141
140
if ( space . canResizeLeft ) {
142
- cssElements . push ( `#${ space . id } -m { left: calc(${ css ( space . left , true ) } + ${ css ( space . width , true ) } - ${ handleOffset } px); width: ${ space . handleSize } px; }` ) ;
141
+ cssElements . push (
142
+ `#${ space . id } -m { left: calc(${ css ( space . left , true ) } + ${ css ( space . width , true ) } - ${ handleOffset } px); width: ${ space . handleSize } px; }` ,
143
+ ) ;
143
144
cssElements . push ( `#${ space . id } -m:after { left: -${ touchHandleSize } px; right: -${ touchHandleSize } px; top: 0; bottom: 0; }` ) ;
144
145
}
145
146
146
147
if ( space . canResizeTop ) {
147
- cssElements . push ( `#${ space . id } -m { top: calc(${ css ( space . top , true ) } + ${ css ( space . height , true ) } - ${ handleOffset } px); height: ${ space . handleSize } px; }` ) ;
148
+ cssElements . push (
149
+ `#${ space . id } -m { top: calc(${ css ( space . top , true ) } + ${ css ( space . height , true ) } - ${ handleOffset } px); height: ${ space . handleSize } px; }` ,
150
+ ) ;
148
151
cssElements . push ( `#${ space . id } -m:after { top: -${ touchHandleSize } px; bottom: -${ touchHandleSize } px; left: 0; right: 0; }` ) ;
149
152
}
150
153
151
154
if ( space . canResizeRight ) {
152
- cssElements . push ( `#${ space . id } -m { right: calc(${ css ( space . right , true ) } + ${ css ( space . width , true ) } - ${ handleOffset } px); width: ${ space . handleSize } px; }` ) ;
155
+ cssElements . push (
156
+ `#${ space . id } -m { right: calc(${ css ( space . right , true ) } + ${ css ( space . width , true ) } - ${ handleOffset } px); width: ${
157
+ space . handleSize
158
+ } px; }`,
159
+ ) ;
153
160
cssElements . push ( `#${ space . id } -m:after { left: -${ touchHandleSize } px; right: -${ touchHandleSize } px; top: 0; bottom: 0; }` ) ;
154
161
}
155
162
156
163
if ( space . canResizeBottom ) {
157
- cssElements . push ( `#${ space . id } -m { bottom: calc(${ css ( space . bottom , true ) } + ${ css ( space . height , true ) } - ${ handleOffset } px); height: ${ space . handleSize } px; }` ) ;
164
+ cssElements . push (
165
+ `#${ space . id } -m { bottom: calc(${ css ( space . bottom , true ) } + ${ css ( space . height , true ) } - ${ handleOffset } px); height: ${
166
+ space . handleSize
167
+ } px; }`,
168
+ ) ;
158
169
cssElements . push ( `#${ space . id } -m:after { top: -${ touchHandleSize } px; bottom: -${ touchHandleSize } px; left: 0; right: 0; }` ) ;
159
170
}
160
171
0 commit comments