File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,12 @@ const IDEView = (props) => {
94
94
const [ sidebarSize , setSidebarSize ] = useState (
95
95
ide . sidebarIsExpanded ? 160 : 20
96
96
) ;
97
+ const [ isOverlayVisible , setIsOverlayVisible ] = useState ( true ) ;
98
+
97
99
const rootFile = useSelector ( selectRootFile ) ;
98
100
const canEditProject = useSelector ( selectCanEditSketch ) ;
99
101
100
102
const cmRef = useRef ( { } ) ;
101
- let overlay = null ;
102
103
103
104
const autosaveIntervalRef = useRef ( null ) ;
104
105
@@ -211,10 +212,11 @@ const IDEView = (props) => {
211
212
split = "vertical"
212
213
defaultSize = "50%"
213
214
onChange = { ( ) => {
214
- overlay . style . display = 'block' ;
215
+ setIsOverlayVisible ( true ) ;
215
216
} }
216
217
onDragFinished = { ( ) => {
217
- overlay . style . display = 'none' ;
218
+ // overlayRef.current.style.display = 'none';
219
+ setIsOverlayVisible ( false ) ;
218
220
} }
219
221
resizerStyle = { {
220
222
borderLeftWidth : '2px' ,
@@ -248,9 +250,7 @@ const IDEView = (props) => {
248
250
< div className = "preview-frame__content" >
249
251
< div
250
252
className = "preview-frame-overlay"
251
- ref = { ( element ) => {
252
- overlay = element ;
253
- } }
253
+ style = { { display : isOverlayVisible ? 'block' : 'none' } }
254
254
/>
255
255
< div >
256
256
{ ( ( preferences . textOutput || preferences . gridOutput ) &&
You can’t perform that action at this time.
0 commit comments