From 98a063aff450a4258888d658131209a0301cb7fc Mon Sep 17 00:00:00 2001 From: jobo322 Date: Fri, 20 Oct 2023 05:51:54 -0500 Subject: [PATCH] fix: detect negative in auto range picking --- src/component/reducer/actions/RangesActions.ts | 2 +- src/data/data1d/Spectrum1D/ranges/detectRanges.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/component/reducer/actions/RangesActions.ts b/src/component/reducer/actions/RangesActions.ts index 02d1b874c..8986c4364 100644 --- a/src/component/reducer/actions/RangesActions.ts +++ b/src/component/reducer/actions/RangesActions.ts @@ -198,7 +198,7 @@ function handleAutoRangesDetection( clean: true, keepPeaks: true, minMaxRatio, - lookNegative, + direction: lookNegative ? 'both' : 'positive', }, }; diff --git a/src/data/data1d/Spectrum1D/ranges/detectRanges.ts b/src/data/data1d/Spectrum1D/ranges/detectRanges.ts index 61e245069..122e11d43 100644 --- a/src/data/data1d/Spectrum1D/ranges/detectRanges.ts +++ b/src/data/data1d/Spectrum1D/ranges/detectRanges.ts @@ -16,7 +16,7 @@ interface DetectRangesOptions { frequencyCluster?: number; // default 16 clean?: boolean; // default true keepPeaks?: boolean; //default true - lookNegative?: boolean; //default false + direction?: 'negative' | 'positive' | 'both'; //default positive }; impurities?: { solvent: string;