There was an error while loading. Please reload this page.
1 parent 4408b4f commit eab2d02Copy full SHA for eab2d02
2 files changed
packages/scratch-gui/src/playground/index.css
@@ -7,7 +7,7 @@ body,
7
margin: 0;
8
9
/* Setting min height/width makes the UI scroll below those sizes */
10
- min-width: 1024px;
+ min-width: 960px;
11
min-height: 640px; /* Min height to fit sprite/backdrop button */
12
}
13
packages/scratch-gui/src/reducers/stage-size.js
@@ -2,8 +2,10 @@ import {STAGE_DISPLAY_SIZES} from '../lib/layout-constants.js';
2
3
const SET_STAGE_SIZE = 'scratch-gui/StageSize/SET_STAGE_SIZE';
4
5
+const isInIframe = typeof window !== 'undefined' && window.self !== window.top;
6
+
const initialState = {
- stageSize: STAGE_DISPLAY_SIZES.large
+ stageSize: isInIframe ? STAGE_DISPLAY_SIZES.small : STAGE_DISPLAY_SIZES.large
};
const reducer = function (state, action) {
0 commit comments