Skip to content

Commit afc8ffc

Browse files
authored
Merge pull request #4210 from paulkaplan/stage-loading
Use the loading screen in player mode
2 parents 0ce0e48 + 70eb240 commit afc8ffc

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/components/gui/gui.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ const GUIComponent = props => {
141141
<StageWrapper
142142
isRendererSupported={isRendererSupported}
143143
isRtl={isRtl}
144+
loading={loading}
144145
stageSize={STAGE_SIZE_MODES.large}
145146
vm={vm}
146147
>

src/components/loader/loader.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@import "../../css/z-index.css";
33

44
.background {
5-
position: fixed;
5+
position: absolute;
66
top: 0;
77
left: 0;
88
width: 100%;

src/components/stage-wrapper/stage-wrapper.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ import Box from '../box/box.jsx';
66
import {STAGE_DISPLAY_SIZES} from '../../lib/layout-constants.js';
77
import StageHeader from '../../containers/stage-header.jsx';
88
import Stage from '../../containers/stage.jsx';
9+
import Loader from '../loader/loader.jsx';
910

1011
import styles from './stage-wrapper.css';
1112

1213
const StageWrapperComponent = function (props) {
1314
const {
1415
isRtl,
1516
isRendererSupported,
17+
loading,
1618
stageSize,
1719
vm
1820
} = props;
@@ -38,13 +40,17 @@ const StageWrapperComponent = function (props) {
3840
null
3941
}
4042
</Box>
43+
{loading ? (
44+
<Loader />
45+
) : null}
4146
</Box>
4247
);
4348
};
4449

4550
StageWrapperComponent.propTypes = {
4651
isRendererSupported: PropTypes.bool.isRequired,
4752
isRtl: PropTypes.bool,
53+
loading: PropTypes.bool,
4854
stageSize: PropTypes.oneOf(Object.keys(STAGE_DISPLAY_SIZES)).isRequired,
4955
vm: PropTypes.instanceOf(VM).isRequired
5056
};

0 commit comments

Comments
 (0)