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 44 * SPDX-License-Identifier: MIT
55 */
66
7- export const widthToHideSidebar = 1376 ;
7+ export const widthToHideSidebar = 1365 ;
88export 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";
1010import {
1111 hideSidebarMediaQuery ,
1212 sidebarToWidthRatio ,
13+ simulatorToWidthRatio ,
1314 widthToHideSidebar ,
1415} from "../common/screenWidthUtils" ;
1516import {
@@ -188,6 +189,13 @@ const EditorWithSimulator = ({
188189 minimums = { simulatorMinimums }
189190 height = "100%"
190191 mode = { simulatorShown ? "open" : "collapsed" }
192+ initialSize = { Math . min (
193+ 350 ,
194+ Math . max (
195+ simulatorMinimums [ 0 ] ,
196+ Math . floor ( window . innerWidth * simulatorToWidthRatio )
197+ )
198+ ) }
191199 >
192200 < SplitViewRemainder >
193201 < Editor editor = { editor } />
You can’t perform that action at this time.
0 commit comments