Last active
September 10, 2022 02:10
-
-
Save ashraf2047/74c75e81535f4b23e822b6b02b3e92a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // The layout of the windows in the IDE. | |
| this.windowGrid = [ | |
| [new FileWindow(), new NoteWindow()], | |
| [new TerminalWindow()], | |
| ]; | |
| const getWindow = (window) => { | |
| let component; | |
| switch (window.type) { | |
| case constants.NOTE: | |
| component = ( | |
| <NoteWindow | |
| key={window.Id} | |
| id={window.Id} | |
| width={calculatedColumnWidthPX} | |
| /> | |
| ); | |
| break; | |
| case constants.TERMINAL: | |
| component = ( | |
| <TerminalWindow | |
| key={window.Id} | |
| id={window.Id} | |
| height={calculatedRowHeightPX} | |
| width={calculatedColumnWidthPX} | |
| /> | |
| ); | |
| break; | |
| case constants.FILE: | |
| component = ( | |
| <FileWindow | |
| height={calculatedRowHeightPX} | |
| key={window.Id} | |
| id={window.Id} | |
| width={calculatedColumnWidthPX} | |
| fileTabWidth={fileTabWidth} | |
| /> | |
| ); | |
| break; | |
| default: | |
| break; | |
| } | |
| return component; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment