nmrium 0.24.0 → 0.24.1
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.
- package/lib/component/reducer/preferencesReducer.js +6 -3
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/reducer/preferencesReducer.js +6 -3
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +1 -1
|
@@ -133,19 +133,22 @@ function handleInit(draft, action) {
|
|
|
133
133
|
currentWorkspacePreferences?.version ||
|
|
134
134
|
!checkKeysExists(workspacePreferences.display, currentWorkspacePreferences?.display))) ||
|
|
135
135
|
!localData) {
|
|
136
|
-
const { workspaces, version } = draft || {};
|
|
136
|
+
const { workspaces, version, workspace: { current }, } = draft || {};
|
|
137
137
|
const display = filterObject(workspacePreferences.display);
|
|
138
138
|
const data = {
|
|
139
139
|
version,
|
|
140
|
+
...(localData?.currentWorkspace && {
|
|
141
|
+
currentWorkspace: localData?.currentWorkspace,
|
|
142
|
+
}),
|
|
140
143
|
workspaces: {
|
|
141
144
|
...workspaces,
|
|
142
|
-
[
|
|
145
|
+
[current]: {
|
|
143
146
|
...workspacePreferences,
|
|
144
147
|
display,
|
|
145
148
|
},
|
|
146
149
|
},
|
|
147
150
|
};
|
|
148
|
-
draft.workspaces[
|
|
151
|
+
draft.workspaces[current] = lodashMerge({}, currentWorkspacePreferences, workspacePreferences);
|
|
149
152
|
storeData('nmr-general-settings', JSON.stringify(data));
|
|
150
153
|
}
|
|
151
154
|
else {
|
|
@@ -43,7 +43,7 @@ export function initiateDatum2D(options, usedColors = {}) {
|
|
|
43
43
|
}
|
|
44
44
|
function getColor(options, usedColors) {
|
|
45
45
|
let color = { positiveColor: 'red', negativeColor: 'blue' };
|
|
46
|
-
if (options?.display
|
|
46
|
+
if (options?.display?.negativeColor === undefined ||
|
|
47
47
|
options?.display?.positiveColor === undefined) {
|
|
48
48
|
color = get2DColor(options.info.experiment, usedColors['2d'] || []);
|
|
49
49
|
}
|
package/lib/versionInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v0.24.
|
|
1
|
+
export default { version: 'v0.24.1' };
|
|
@@ -140,19 +140,22 @@ function handleInit(draft, action) {
|
|
|
140
140
|
currentWorkspacePreferences?.version ||
|
|
141
141
|
!checkKeysExists(workspacePreferences.display, currentWorkspacePreferences?.display))) ||
|
|
142
142
|
!localData) {
|
|
143
|
-
const { workspaces, version } = draft || {};
|
|
143
|
+
const { workspaces, version, workspace: { current }, } = draft || {};
|
|
144
144
|
const display = filterObject(workspacePreferences.display);
|
|
145
145
|
const data = {
|
|
146
146
|
version,
|
|
147
|
+
...(localData?.currentWorkspace && {
|
|
148
|
+
currentWorkspace: localData?.currentWorkspace,
|
|
149
|
+
}),
|
|
147
150
|
workspaces: {
|
|
148
151
|
...workspaces,
|
|
149
|
-
[
|
|
152
|
+
[current]: {
|
|
150
153
|
...workspacePreferences,
|
|
151
154
|
display,
|
|
152
155
|
},
|
|
153
156
|
},
|
|
154
157
|
};
|
|
155
|
-
draft.workspaces[
|
|
158
|
+
draft.workspaces[current] = (0, merge_1.default)({}, currentWorkspacePreferences, workspacePreferences);
|
|
156
159
|
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(data));
|
|
157
160
|
}
|
|
158
161
|
else {
|
|
@@ -73,7 +73,7 @@ function initiateDatum2D(options, usedColors = {}) {
|
|
|
73
73
|
exports.initiateDatum2D = initiateDatum2D;
|
|
74
74
|
function getColor(options, usedColors) {
|
|
75
75
|
let color = { positiveColor: 'red', negativeColor: 'blue' };
|
|
76
|
-
if (options?.display
|
|
76
|
+
if (options?.display?.negativeColor === undefined ||
|
|
77
77
|
options?.display?.positiveColor === undefined) {
|
|
78
78
|
color = (0, getColor_1.get2DColor)(options.info.experiment, usedColors['2d'] || []);
|
|
79
79
|
}
|
package/lib-cjs/versionInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "0.24.
|
|
4
|
+
"version": "0.24.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib-cjs/component/NMRium.js",
|
|
7
7
|
"module": "lib/component/NMRium.js",
|