-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ecc7b86
commit cc3ad59
Showing
5 changed files
with
64 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { SplitPane } from 'analysis-ui-components'; | ||
|
||
import { usePreferences } from './context/PreferencesContext'; | ||
|
||
export function SplitPaneWrapper({ children }) { | ||
const { current } = usePreferences(); | ||
return ( | ||
<SplitPane | ||
key={current?.display?.general?.hidePanelOnLoad ? 'true' : 'false'} | ||
This comment has been minimized.
Sorry, something went wrong. |
||
initialSeparation="590px" | ||
orientation="horizontal" | ||
sideSeparation="end" | ||
initialClosed={current?.display?.general?.hidePanelOnLoad || false} | ||
> | ||
{children} | ||
</SplitPane> | ||
); | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Workspace } from './Workspace'; | ||
import { basic } from './basic'; | ||
|
||
export const embedded: Workspace = { | ||
version: 1, | ||
label: 'Embedded workspace', | ||
display: { | ||
general: { | ||
disableMultipletAnalysis: false, | ||
hideSetSumFromMolecule: false, | ||
hideGeneralSettings: false, | ||
experimentalFeatures: { display: true }, | ||
hidePanelOnLoad: true, | ||
}, | ||
|
||
panels: { | ||
spectraPanel: { display: true, open: true }, | ||
informationPanel: { display: true, open: false }, | ||
peaksPanel: { display: true, open: false }, | ||
integralsPanel: { display: true, open: false }, | ||
rangesPanel: { display: true, open: false }, | ||
structuresPanel: { display: true, open: false }, | ||
filtersPanel: { display: true, open: false }, | ||
zonesPanel: { display: true, open: false }, | ||
summaryPanel: { display: false, open: false }, | ||
multipleSpectraAnalysisPanel: { display: false, open: false }, | ||
databasePanel: { display: false, open: false }, | ||
predictionPanel: { display: false, open: false }, | ||
}, | ||
}, | ||
controllers: basic.controllers, | ||
formatting: basic.formatting, | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { basic } from './basic'; | ||
import { embedded } from './embedded'; | ||
import { exercise } from './exercise'; | ||
import { prediction } from './prediction'; | ||
import { process1D } from './process1D'; | ||
|
||
export default { exercise, default: basic, process1D, prediction }; | ||
export default { exercise, default: basic, process1D, prediction, embedded }; |
@targos
should we do it in this way to force the SplitPane to re-render or we should listen for the initialClosed property inside the SplitPane component and once its value change update the local state