Skip to content

Commit

Permalink
chore: adapt to new structure of options of Filters[1|2]DManager reap…
Browse files Browse the repository at this point in the history
…plyFilters n enableFilter
  • Loading branch information
jobo322 committed Dec 3, 2024
1 parent 67048cf commit 2a63367
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/component/reducer/actions/FiltersActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ function rollbackSpectrumByFilter(
});

if (isSpectrum1D(datum)) {
Filters1DManager.reapplyFilters(datum, filters);
Filters1DManager.reapplyFilters(datum, { filters });
} else {
Filters2DManager.reapplyFilters(datum, filters);
Filters2DManager.reapplyFilters(datum, { filters });
}

draft.tempData = current(draft).data;
Expand Down Expand Up @@ -1276,10 +1276,10 @@ function handleEnableFilter(draft: Draft<State>, action: EnableFilterAction) {

//apply filter into the spectrum
if (isSpectrum1D(datum)) {
Filters1DManager.enableFilter(datum, filterID, enabled);
Filters1DManager.enableFilter(datum, { id: filterID, enabled });
}
if (isSpectrum2D(datum)) {
Filters2DManager.enableFilter(datum, filterID, enabled);
Filters2DManager.enableFilter(datum, { id: filterID, enabled });
}

resetSelectedTool(draft);
Expand Down

0 comments on commit 2a63367

Please sign in to comment.