Skip to content

Commit 6e094b3

Browse files
authored
Merge branch 'master' into feat/comparison-spectra
2 parents ac44db9 + 78339d7 commit 6e094b3

8 files changed

Lines changed: 45 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented in this file.
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/).
6+
7+
## [1.8.0] - 2026-06-29
8+
9+
### Added
10+
- LC/MS visualization support for OpenLab and Chemstation data (#289)
11+
- Two-click integration: creation, split, and visual split with JCAMP persistence (#303)
12+
- Developer architecture documentation (#307)
13+
14+
### Fixed
15+
- LC/MS review regressions B1, B4–B7 (#316):
16+
- peak-add restored on non-LC/MS layouts (NMR/IR/MS)
17+
- `Convert2Peak` honours stored LC/MS peaks (with offset) instead of recomputing
18+
- CV current-density factor corrected for areas in mm² (chart, panel and submit/export)
19+
- crash guards for the UV-Vis viewer update path and `drawBar`
20+
21+
### CI / Build
22+
- GitHub Actions moved to node24 action runtimes; Node pinned to 22.23.1 (#315)
23+
24+
### Dependencies
25+
- Bump http-proxy-middleware 2.0.9 → 2.0.10 (#311)
26+
- Bump tmp 0.2.4 → 0.2.7 (#306)
27+
28+
[1.8.0]: https://github.com/ComPlat/react-spectra-editor/releases/tag/v1.8.0

dist/components/cmd_bar/r05_submit_btn.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
44
Object.defineProperty(exports, "__esModule", {
55
value: true
66
});
7-
exports.default = void 0;
7+
exports.default = exports.computeCvYScaleFactor = void 0;
88
var _react = _interopRequireDefault(require("react"));
99
var _propTypes = _interopRequireDefault(require("prop-types"));
1010
var _reactRedux = require("react-redux");
@@ -60,17 +60,16 @@ const computeCvYScaleFactor = (feature, cyclicvoltaSt) => {
6060
const rawArea = (cyclicvoltaSt.areaValue === '' ? 1.0 : cyclicvoltaSt.areaValue) || 1.0;
6161
const areaUnit = cyclicvoltaSt.areaUnit || 'cm²';
6262
const safeArea = rawArea > 0 ? rawArea : 1.0;
63+
// areaInCm2 already converts mm² → cm², so factor is A/cm². Do NOT divide by 100 again.
6364
const areaInCm2 = areaUnit === 'mm²' ? safeArea / 100.0 : safeArea;
6465
let factor = 1.0 / areaInCm2;
6566
const baseY = feature && feature.yUnit ? String(feature.yUnit) : 'A';
6667
if (/mA/i.test(baseY)) {
6768
factor *= 1000.0;
6869
}
69-
if (areaUnit === 'mm²') {
70-
factor /= 100.0;
71-
}
7270
return factor;
7371
};
72+
exports.computeCvYScaleFactor = computeCvYScaleFactor;
7473
const defaultThreshold = {
7574
isEdit: true,
7675
value: false,

dist/components/d3_line_rect/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,15 +396,12 @@ class ViewerLineRect extends _react.default.Component {
396396
} = zoom || {};
397397
if (!Array.isArray(sweepExtent)) return;
398398
const uvvisViewFeature = this.extractUvvisView();
399-
if (uvvisViewFeature) {
399+
if (uvvisViewFeature?.data?.[0]) {
400400
const hasLineSvg = !!document.querySelector(`${this.rootKlassLine} .${_list_graph.LIST_BRUSH_SVG_GRAPH.LINE}`);
401401
if (!hasLineSvg) {
402402
(0, _draw.drawMain)(this.rootKlassLine, W, H, _list_graph.LIST_BRUSH_SVG_GRAPH.LINE);
403403
}
404-
const {
405-
data
406-
} = uvvisViewFeature;
407-
const currentData = data[0];
404+
const currentData = uvvisViewFeature.data[0];
408405
const {
409406
x,
410407
y

dist/components/d3_line_rect/rect_focus.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class RectFocus {
147147
yt
148148
} = (0, _compass.TfRescale)(this);
149149
this.updatePathCall(xt, yt);
150+
if (!this.tTrEndPts.length) return;
150151
const yRef = this.tTrEndPts[0].y;
151152
const bars = this.bars.selectAll('rect').data(this.data);
152153
bars.exit().attr('class', 'exit').remove();

dist/components/d3_multi/multi_focus.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,13 @@ class MultiFocus {
195195
const rawArea = (cyclicvoltaSt.areaValue === '' ? 1.0 : cyclicvoltaSt.areaValue) || 1.0;
196196
const areaUnit = cyclicvoltaSt.areaUnit || 'cm²';
197197
const safeArea = rawArea > 0 ? rawArea : 1.0;
198+
// areaInCm2 already converts mm² → cm², so factor is A/cm². Do NOT divide by 100 again.
198199
const areaInCm2 = areaUnit === 'mm²' ? safeArea / 100.0 : safeArea;
199200
factor = 1.0 / areaInCm2;
200201
const baseY = feature && feature.yUnit ? String(feature.yUnit) : 'A';
201202
if (/mA/i.test(baseY)) {
202203
factor *= 1000.0;
203204
}
204-
if (areaUnit === 'mm²') {
205-
factor /= 100.0;
206-
}
207205
}
208206
return factor;
209207
}

dist/components/panel/cyclic_voltamery_data.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,12 @@ const CyclicVoltammetryPanel = ({
174174
const rawArea = (cyclicVoltaState && cyclicVoltaState.areaValue === '' ? 1.0 : cyclicVoltaState?.areaValue) || 1.0;
175175
const areaUnit = cyclicVoltaState && cyclicVoltaState.areaUnit ? cyclicVoltaState.areaUnit : 'cm²';
176176
const safeArea = rawArea > 0 ? rawArea : 1.0;
177+
const areaInCm2 = areaUnit === 'mm²' ? safeArea / 100.0 : safeArea;
177178
let val = y;
178179
let unit = isMilli ? 'mA' : 'A';
179180
if (useDensity) {
180-
val = y / safeArea;
181-
unit = `${unit}/${areaUnit}`;
181+
val = y / areaInCm2;
182+
unit = `${unit}/cm²`;
182183
}
183184
if (isMilli) {
184185
val *= 1000.0;

dist/helpers/chem.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ const ToFrequency = exports.ToFrequency = (0, _reselect.createSelector)(getLayou
161161
const getThreshold = state => state.threshold ? state.threshold.list[state.curve.curveIdx].value * 1.0 : false;
162162
const Convert2Peak = (feature, threshold, offset, upThreshold = false, lowThreshold = false) => {
163163
if (feature?.operation?.layout === 'LC/MS') {
164+
if (feature.peaks?.length) {
165+
return feature.peaks.map(p => ({
166+
x: p.x - (offset || 0),
167+
y: p.y
168+
}));
169+
}
164170
const data = feature.data[0];
165171
if (!data) return [];
166172
const {
@@ -196,12 +202,6 @@ const Convert2Peak = (feature, threshold, offset, upThreshold = false, lowThresh
196202
const {
197203
layout
198204
} = operation;
199-
if (_format.default.isLCMsLayout(layout) && feature.peaks) {
200-
return feature.peaks.map(p => ({
201-
x: p.x - (offset || 0),
202-
y: p.y
203-
}));
204-
}
205205
if ((_format.default.isCyclicVoltaLayout(layout) || _format.default.isCDSLayout(layout)) && (upperThres || lowerThres)) {
206206
let upperThresVal = upThreshold || upperThres;
207207
if (!upperThresVal) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@complat/react-spectra-editor",
3-
"version": "1.7.2",
3+
"version": "1.8.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",

0 commit comments

Comments
 (0)