Skip to content

Commit 0febb00

Browse files
committed
display units on multi spectra view
1 parent ba84a45 commit 0febb00

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@complat/react-spectra-editor",
3-
"version": "1.3.4",
3+
"version": "1.4.0",
44
"description": "An editor to View and Edit Chemical Spectra data (NMR, IR, MS, CV, UIVIS, XRD, GC, and DSC).",
55
"repository": {
66
"type": "git",

src/helpers/chem.js

+4
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ const extractVoltammetryData = (jcamp) => {
456456
const buildPeakFeature = (jcamp, layout, peakUp, s, thresRef, upperThres = false, lowerThres = false) => { // eslint-disable-line
457457
const { xType, info } = jcamp;
458458
const subTyp = xType ? ` - ${xType}` : '';
459+
const xUnit = jcamp.info.XUNITS ? jcamp.info.XUNITS : '';
460+
const yUnit = jcamp.info.YUNITS ? jcamp.info.YUNITS : '';
459461

460462
return (
461463
Object.assign(
@@ -466,6 +468,8 @@ const buildPeakFeature = (jcamp, layout, peakUp, s, thresRef, upperThres = false
466468
scanCount: +info.$CSSCANCOUNT,
467469
scanAutoTarget: +info.$CSSCANAUTOTARGET,
468470
scanEditTarget: +info.$CSSCANEDITTARGET,
471+
xUnit,
472+
yUnit,
469473
shift: extractShift(s, jcamp),
470474
operation: {
471475
layout,

0 commit comments

Comments
 (0)