@complat/react-spectra-editor 1.0.0-rc6.alpha.1 → 1.0.0-rc6.alpha.2

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.
@@ -80,16 +80,17 @@ const GraphSelectionPanel = _ref => {
80
80
  if (selectedSubLayout && subLayoutValues.length > 1) {
81
81
  const subLayout = subLayoutsInfo[selectedSubLayout];
82
82
  itemsSubLayout = subLayout.map((spectra, idx) => {
83
+ const spectraIdx = spectra.curveIdx;
83
84
  const {
84
85
  color
85
86
  } = spectra;
86
87
  let filename = '';
87
- if (entityFileNames && curveIdx < entityFileNames.length) {
88
- filename = entityFileNames[curveIdx];
88
+ if (entityFileNames && spectraIdx < entityFileNames.length) {
89
+ filename = entityFileNames[spectraIdx];
89
90
  }
90
91
  return {
91
92
  name: `${idx + 1}.`,
92
- idx,
93
+ idx: spectraIdx,
93
94
  color,
94
95
  filename
95
96
  };
@@ -155,7 +156,7 @@ const GraphSelectionPanel = _ref => {
155
156
  style: {
156
157
  backgroundColor: item.color
157
158
  }
158
- }), item.filename !== '' ? /*#__PURE__*/_react.default.createElement("span", null, "File: ", item.filename) : null // eslint-disable-line
159
+ }), item.name !== '' ? /*#__PURE__*/_react.default.createElement("span", null, "File: ", item.name) : null // eslint-disable-line
159
160
  )))))) : /*#__PURE__*/_react.default.createElement(_core.List, null, items.map(item => /*#__PURE__*/_react.default.createElement(_core.ListItem, {
160
161
  key: item.idx,
161
162
  onClick: () => onChange(item.idx),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@complat/react-spectra-editor",
3
- "version": "1.0.0-rc6.alpha.1",
3
+ "version": "1.0.0-rc6.alpha.2",
4
4
  "description": "An editor to View and Edit Chemical Spectra data (NMR, IR and MS, CV, UIVIS, XRD).",
5
5
  "repository": {
6
6
  "type": "git",