@complat/react-spectra-editor 1.0.0-rc13.alpha.2 → 1.0.0-rc13.beta.0

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.
@@ -113,7 +113,7 @@ class LineFocus {
113
113
  const sameMySt = prevMySt === nextMySt;
114
114
  const sameTePt = prevTePt === this.tTrEndPts.length;
115
115
  const sameDtPk = prevDtPk === this.dataPks.length;
116
- const sameSfPk = prevSfPk === this.tSfPeaks.length;
116
+ const sameSfPk = JSON.stringify(prevSfPk) === JSON.stringify(this.tSfPeaks);
117
117
  const sameData = prevData === this.data.length;
118
118
  const sameRef = prevEpSt.prevOffset === nextEpSt.prevOffset;
119
119
  this.shouldUpdate = Object.assign({}, this.shouldUpdate, {
@@ -140,7 +140,7 @@ class LineFocus {
140
140
  const prevYt = yt(1.1);
141
141
  const prevTePt = this.tTrEndPts.length;
142
142
  const prevDtPk = this.dataPks.length;
143
- const prevSfPk = this.tSfPeaks.length;
143
+ const prevSfPk = this.tSfPeaks;
144
144
  const prevData = this.data.length;
145
145
  const prevLySt = this.layout;
146
146
  this.shouldUpdate = Object.assign({}, this.shouldUpdate, {
@@ -116,7 +116,7 @@ class MultiFocus {
116
116
  const sameLySt = prevLySt === this.layout;
117
117
  const sameTePt = prevTePt === this.tTrEndPts.length;
118
118
  const sameDtPk = prevDtPk === this.dataPks.length;
119
- const sameSfPk = prevSfPk === this.tSfPeaks.length;
119
+ const sameSfPk = JSON.stringify(prevSfPk) === JSON.stringify(this.tSfPeaks);
120
120
  const sameData = prevData === this.data.length;
121
121
  this.shouldUpdate = Object.assign({}, this.shouldUpdate, {
122
122
  sameXY,
@@ -139,7 +139,7 @@ class MultiFocus {
139
139
  const prevYt = yt(1.1);
140
140
  const prevTePt = this.tTrEndPts.length;
141
141
  const prevDtPk = this.dataPks.length;
142
- const prevSfPk = this.tSfPeaks.length;
142
+ const prevSfPk = this.tSfPeaks;
143
143
  const prevData = this.data.length;
144
144
  const prevLySt = this.layout;
145
145
  this.shouldUpdate = Object.assign({}, this.shouldUpdate, {
@@ -276,7 +276,7 @@ const formatedDLSIntensity = function (peaks, maxY) {
276
276
  const better = !ordered[x] || p.y > ordered[x];
277
277
  if (better) {
278
278
  ordered = Object.assign({}, ordered, {
279
- [x]: p.y
279
+ [x]: fixDigit(p.y, 2)
280
280
  });
281
281
  }
282
282
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@complat/react-spectra-editor",
3
- "version": "1.0.0-rc13.alpha.2",
3
+ "version": "1.0.0-rc13.beta.0",
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",