Skip to content

Commit d6e7617

Browse files
feat: show peaks by default only for carbon spectra
1 parent ab4a1d3 commit d6e7617

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/component/hooks/useActiveSpectrumRangesViewState.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ import { useChartData } from '../context/ChartContext.js';
66
import { useActiveSpectrum } from './useActiveSpectrum.js';
77

88
export function getDefaultRangesViewState(nucleus: string): RangesViewState {
9+
const isProton = nucleus === '1H';
10+
const isCarbon = nucleus === '13C';
11+
912
return {
10-
showPeaks: false,
13+
showPeaks: isCarbon,
1114
showMultiplicityTrees: false,
1215
showIntegrals: false,
13-
showIntegralsValues: nucleus === '1H',
16+
showIntegralsValues: isProton,
1417
showJGraph: false,
1518
displayingMode: 'spread',
1619
integralsScaleRatio: 1,

0 commit comments

Comments
 (0)