@@ -35,23 +35,17 @@ const StageComponent = props => {
3535 const stageDimensions = getStageDimensions ( stageSize , isFullScreen ) ;
3636
3737 return (
38- < div >
38+ < React . Fragment >
3939 < Box
40- className = { classNames ( {
41- [ styles . stageWrapper ] : ! isFullScreen ,
42- [ styles . stageWrapperOverlay ] : isFullScreen ,
43- [ styles . withColorPicker ] : ! isFullScreen && isColorPicking
44- } ) }
45- style = { {
46- minHeight : stageDimensions . height ,
47- minWidth : stageDimensions . width
48- } }
40+ className = { classNames (
41+ styles . stageWrapper ,
42+ { [ styles . withColorPicker ] : ! isFullScreen && isColorPicking } ) }
4943 onDoubleClick = { onDoubleClick }
5044 >
5145 < Box
5246 className = { classNames (
5347 styles . stage ,
54- { [ styles . stageOverlayContent ] : isFullScreen }
48+ { [ styles . fullScreen ] : isFullScreen }
5549 ) }
5650 style = { {
5751 height : stageDimensions . height ,
@@ -66,18 +60,61 @@ const StageComponent = props => {
6660 } }
6761 { ...boxProps }
6862 />
63+ < Box className = { styles . monitorWrapper } >
64+ < MonitorList
65+ draggable = { useEditorDragStyle }
66+ stageSize = { stageDimensions }
67+ />
68+ </ Box >
69+ < Box className = { styles . frameWrapper } >
70+ < TargetHighlight
71+ className = { styles . frame }
72+ stageHeight = { stageDimensions . height }
73+ stageWidth = { stageDimensions . width }
74+ />
75+ </ Box >
76+ { isColorPicking && colorInfo ? (
77+ < Loupe colorInfo = { colorInfo } />
78+ ) : null }
6979 </ Box >
70- < Box className = { styles . monitorWrapper } >
71- < MonitorList
72- draggable = { useEditorDragStyle }
73- stageSize = { stageDimensions }
74- />
75- </ Box >
76- < Box className = { styles . frameWrapper } >
77- < TargetHighlight
78- className = { styles . frame }
79- stageHeight = { stageDimensions . height }
80- stageWidth = { stageDimensions . width }
80+
81+ { /* `stageOverlays` is for items that should *not* have their overflow contained within the stage */ }
82+ < Box
83+ className = { classNames (
84+ styles . stageOverlays ,
85+ { [ styles . fullScreen ] : isFullScreen }
86+ ) }
87+ >
88+ < div
89+ className = { styles . stageBottomWrapper }
90+ style = { {
91+ width : stageDimensions . width ,
92+ height : stageDimensions . height
93+ } }
94+ >
95+ { micIndicator ? (
96+ < MicIndicator
97+ className = { styles . micIndicator }
98+ stageSize = { stageDimensions }
99+ />
100+ ) : null }
101+ { question === null ? null : (
102+ < div
103+ className = { styles . questionWrapper }
104+ style = { { width : stageDimensions . width } }
105+ >
106+ < Question
107+ question = { question }
108+ onQuestionAnswered = { onQuestionAnswered }
109+ />
110+ </ div >
111+ ) }
112+ </ div >
113+ < canvas
114+ className = { styles . draggingSprite }
115+ height = { 0 }
116+ ref = { dragRef }
117+ width = { 0 }
81118 />
82119 </ Box >
83120 { isStarted ? null : (
@@ -86,52 +123,14 @@ const StageComponent = props => {
86123 wrapperClass = { styles . greenFlagOverlayWrapper }
87124 />
88125 ) }
89- { isColorPicking && colorInfo ? (
90- < Box className = { styles . colorPickerWrapper } >
91- < Loupe colorInfo = { colorInfo } />
92- </ Box >
93- ) : null }
94- < div
95- className = { styles . stageBottomWrapper }
96- style = { {
97- width : stageDimensions . width ,
98- height : stageDimensions . height ,
99- left : '50%' ,
100- marginLeft : stageDimensions . width * - 0.5
101- } }
102- >
103- { micIndicator ? (
104- < MicIndicator
105- className = { styles . micIndicator }
106- stageSize = { stageDimensions }
107- />
108- ) : null }
109- { question === null ? null : (
110- < div
111- className = { styles . questionWrapper }
112- style = { { width : stageDimensions . width } }
113- >
114- < Question
115- question = { question }
116- onQuestionAnswered = { onQuestionAnswered }
117- />
118- </ div >
119- ) }
120- </ div >
121- < canvas
122- className = { styles . draggingSprite }
123- height = { 0 }
124- ref = { dragRef }
125- width = { 0 }
126- />
127126 </ Box >
128127 { isColorPicking ? (
129128 < Box
130129 className = { styles . colorPickerBackground }
131130 onClick = { onDeactivateColorPicker }
132131 />
133132 ) : null }
134- </ div >
133+ </ React . Fragment >
135134 ) ;
136135} ;
137136StageComponent . propTypes = {
0 commit comments