Skip to content

[electrophysiology_browser] Fix conditional EEG display #9742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ import SidebarContent from './components/SidebarContent';
let EEGLabSeriesProvider;
let SeriesRenderer;
let EEGMontage;

EEGLabSeriesProvider = require(
'./react-series-data-viewer/src/eeglab/EEGLabSeriesProvider'
).default;
EEGMontage = require(
'./react-series-data-viewer/src/series/components/EEGMontage'
).default;
if (EEG_VIS_ENABLED) {
EEGLabSeriesProvider = require(
'./react-series-data-viewer/src/eeglab/EEGLabSeriesProvider'
).default;
SeriesRenderer = require(
'./react-series-data-viewer/src/series/components/SeriesRenderer'
).default;
EEGMontage = require(
'./react-series-data-viewer/src/series/components/EEGMontage'
).default;
}

/**
Expand Down Expand Up @@ -366,7 +367,6 @@ class ElectrophysiologySessionView extends Component {
title={this.state.database[i].file.name}
data={this.state.database[i].file.details}
>
{EEG_VIS_ENABLED &&
<div className="react-series-data-viewer-scoped col-xs-12">
<EEGLabSeriesProvider
chunksURL={
Expand All @@ -383,6 +383,7 @@ class ElectrophysiologySessionView extends Component {
this.state.database[i].file.summary[0].value
}
>
{EEG_VIS_ENABLED &&
<Panel
id='channel-viewer'
title={
Expand Down Expand Up @@ -443,7 +444,7 @@ class ElectrophysiologySessionView extends Component {
<SeriesRenderer
physioFileID={this.state.database[i].file.id}
/>
</Panel>
</Panel>}
<div className='row'>
<div className='col-md-6 col-lg-4'>
<SummaryPanel
Expand All @@ -462,7 +463,7 @@ class ElectrophysiologySessionView extends Component {
</div>
</div>
</EEGLabSeriesProvider>
</div>}
</div>
</FilePanel>
</div>
);
Expand Down
8 changes: 0 additions & 8 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,6 @@ plugins.push(new DefinePlugin({
EEG_VIS_ENABLED: EEGVisEnabled,
}));

if (EEGVisEnabled !== 'true' && EEGVisEnabled !== '1' ) {
plugins.push(
new IgnorePlugin({
resourceRegExp: /react-series-data-viewer/,
})
);
}

/**
* Add the project-specific modules and entry points to the record of main
* LORIS modules.
Expand Down
Loading