File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 4
4
* SPDX-License-Identifier: MIT
5
5
*/
6
6
7
- export const widthToHideSidebar = 1376 ;
7
+ export const widthToHideSidebar = 1365 ;
8
8
export const sidebarToWidthRatio = 0.27 ;
9
- export const hideSidebarMediaQuery = `(max-width: ${ widthToHideSidebar - 1 } px)` ;
9
+ export const simulatorToWidthRatio = 0.29 ;
10
+ export const hideSidebarMediaQuery = `(max-width: ${ widthToHideSidebar } px)` ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { useIntl } from "react-intl";
10
10
import {
11
11
hideSidebarMediaQuery ,
12
12
sidebarToWidthRatio ,
13
+ simulatorToWidthRatio ,
13
14
widthToHideSidebar ,
14
15
} from "../common/screenWidthUtils" ;
15
16
import {
@@ -188,6 +189,13 @@ const EditorWithSimulator = ({
188
189
minimums = { simulatorMinimums }
189
190
height = "100%"
190
191
mode = { simulatorShown ? "open" : "collapsed" }
192
+ initialSize = { Math . min (
193
+ 350 ,
194
+ Math . max (
195
+ simulatorMinimums [ 0 ] ,
196
+ Math . floor ( window . innerWidth * simulatorToWidthRatio )
197
+ )
198
+ ) }
191
199
>
192
200
< SplitViewRemainder >
193
201
< Editor editor = { editor } />
You can’t perform that action at this time.
0 commit comments