Skip to content

Commit 048bc31

Browse files
committed
Fix position of mobile Stop button.
1 parent a73be1c commit 048bc31

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

client/modules/IDE/pages/IDEView.jsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ const IDEView = () => {
127127
};
128128
}, [shouldAutosave, dispatch]);
129129

130+
const consoleCollapsedSize = 29;
131+
const currentConsoleSize = ide.consoleIsExpanded
132+
? consoleSize
133+
: consoleCollapsedSize;
134+
130135
return (
131136
<RootPage>
132137
<Helmet>
@@ -171,8 +176,8 @@ const IDEView = () => {
171176
<SplitPane
172177
split="horizontal"
173178
primary="second"
174-
size={ide.consoleIsExpanded ? consoleSize : 29}
175-
minSize={29}
179+
size={currentConsoleSize}
180+
minSize={consoleCollapsedSize}
176181
onChange={(size) => {
177182
setConsoleSize(size);
178183
}}
@@ -206,16 +211,16 @@ const IDEView = () => {
206211
<>
207212
<FloatingActionButton
208213
syncFileContent={syncFileContent}
209-
offsetBottom={ide.isPlaying ? consoleSize : 20}
214+
offsetBottom={ide.isPlaying ? currentConsoleSize : 0}
210215
/>
211216
<PreviewWrapper show={ide.isPlaying}>
212217
<SplitPane
213218
style={{ position: 'static' }}
214219
split="horizontal"
215220
primary="second"
216-
size={ide.consoleIsExpanded ? consoleSize : 29}
217-
minSize={29}
218-
onChange={(size) => {
221+
size={currentConsoleSize}
222+
minSize={consoleCollapsedSize}
223+
onChange={(size) => {
219224
setConsoleSize(size);
220225
setIsOverlayVisible(true);
221226
}}

0 commit comments

Comments
 (0)