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) => {
9494 const [ sidebarSize , setSidebarSize ] = useState (
9595 ide . sidebarIsExpanded ? 160 : 20
9696 ) ;
97+ const [ isOverlayVisible , setIsOverlayVisible ] = useState ( true ) ;
98+
9799 const rootFile = useSelector ( selectRootFile ) ;
98100 const canEditProject = useSelector ( selectCanEditSketch ) ;
99101
100102 const cmRef = useRef ( { } ) ;
101- let overlay = null ;
102103
103104 const autosaveIntervalRef = useRef ( null ) ;
104105
@@ -211,10 +212,11 @@ const IDEView = (props) => {
211212 split = "vertical"
212213 defaultSize = "50%"
213214 onChange = { ( ) => {
214- overlay . style . display = 'block' ;
215+ setIsOverlayVisible ( true ) ;
215216 } }
216217 onDragFinished = { ( ) => {
217- overlay . style . display = 'none' ;
218+ // overlayRef.current.style.display = 'none';
219+ setIsOverlayVisible ( false ) ;
218220 } }
219221 resizerStyle = { {
220222 borderLeftWidth : '2px' ,
@@ -248,9 +250,7 @@ const IDEView = (props) => {
248250 < div className = "preview-frame__content" >
249251 < div
250252 className = "preview-frame-overlay"
251- ref = { ( element ) => {
252- overlay = element ;
253- } }
253+ style = { { display : isOverlayVisible ? 'block' : 'none' } }
254254 />
255255 < div >
256256 { ( ( preferences . textOutput || preferences . gridOutput ) &&
You can’t perform that action at this time.
0 commit comments