@complat/react-spectra-editor 1.0.0-alpha.13.5 → 1.0.0-alpha.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,17 +9,13 @@ var _action_type = require("../constants/action_type");
|
|
|
9
9
|
var _list_layout = require("../constants/list_layout");
|
|
10
10
|
/* eslint-disable no-plusplus */
|
|
11
11
|
|
|
12
|
-
const getCurveSt = state => state.curve;
|
|
13
12
|
const getLayoutSt = state => state.layout;
|
|
13
|
+
const getCurveSt = state => state.curve;
|
|
14
14
|
function getMaxMinPeak(curve) {
|
|
15
15
|
return curve.maxminPeak;
|
|
16
16
|
}
|
|
17
17
|
function* setCyclicVoltametry(action) {
|
|
18
18
|
// eslint-disable-line
|
|
19
|
-
const layoutSt = yield (0, _effects.select)(getLayoutSt);
|
|
20
|
-
if (layoutSt !== _list_layout.LIST_LAYOUT.CYCLIC_VOLTAMMETRY) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
19
|
const curveSt = yield (0, _effects.select)(getCurveSt);
|
|
24
20
|
const {
|
|
25
21
|
listCurves
|
|
@@ -33,6 +29,13 @@ function* setCyclicVoltametry(action) {
|
|
|
33
29
|
if (numberOfCurves <= 0) {
|
|
34
30
|
return;
|
|
35
31
|
}
|
|
32
|
+
const firstCurve = listCurves[0];
|
|
33
|
+
const {
|
|
34
|
+
layout
|
|
35
|
+
} = firstCurve;
|
|
36
|
+
if (layout !== _list_layout.LIST_LAYOUT.CYCLIC_VOLTAMMETRY) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
36
39
|
for (let index = 0; index < listCurves.length; index++) {
|
|
37
40
|
const curve = listCurves[index];
|
|
38
41
|
const maxminPeak = getMaxMinPeak(curve);
|
package/package.json
CHANGED