@complat/react-spectra-editor 0.10.13-beta.5 → 0.10.14-alpha.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.
|
@@ -466,6 +466,14 @@ var LineFocus = function () {
|
|
|
466
466
|
var igtp = this.tags.igtPath.selectAll('text').data(itgs);
|
|
467
467
|
igtp.exit().attr('class', 'exit').remove();
|
|
468
468
|
|
|
469
|
+
if (itgs.length === 0 || isDisable) {
|
|
470
|
+
// remove drawn are under curve
|
|
471
|
+
var _auc = this.tags.aucPath.selectAll('path').data(stack);
|
|
472
|
+
_auc.exit().attr('class', 'exit').remove();
|
|
473
|
+
_auc.merge(_auc);
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
|
|
469
477
|
if (ignoreRef) {
|
|
470
478
|
this.drawAUC(stack);
|
|
471
479
|
} else {
|
package/dist/helpers/chem.js
CHANGED
|
@@ -585,8 +585,12 @@ var Convert2Thres = function Convert2Thres(feature, thresSt) {
|
|
|
585
585
|
|
|
586
586
|
var Convert2DValue = function Convert2DValue(doubleTheta) {
|
|
587
587
|
var lambda = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15406;
|
|
588
|
+
var isRadian = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
588
589
|
|
|
589
590
|
var theta = doubleTheta / 2;
|
|
591
|
+
if (isRadian) {
|
|
592
|
+
theta = theta / 180 * Math.PI;
|
|
593
|
+
}
|
|
590
594
|
var sinTheta = Math.sin(theta);
|
|
591
595
|
var dValue = lambda / (2 * sinTheta);
|
|
592
596
|
return dValue;
|
package/dist/helpers/format.js
CHANGED
|
@@ -62,7 +62,7 @@ var toPeakStr = function toPeakStr(peaks) {
|
|
|
62
62
|
return str;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
var spectraOps = (_spectraOps = {}, _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.PLAIN, { head: '', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.H1, { head: '1H', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.C13, { head: '13C', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.F19, { head: '19F', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.P31, { head: '31P', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.N15, { head: '15N', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.Si29, { head: '29Si', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.IR, { head: 'IR', tail: ' cm-1' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.RAMAN, { head: 'RAMAN', tail: ' cm-1' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.UVVIS, { head: 'UV
|
|
65
|
+
var spectraOps = (_spectraOps = {}, _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.PLAIN, { head: '', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.H1, { head: '1H', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.C13, { head: '13C', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.F19, { head: '19F', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.P31, { head: '31P', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.N15, { head: '15N', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.Si29, { head: '29Si', tail: '.' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.IR, { head: 'IR', tail: ' cm-1' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.RAMAN, { head: 'RAMAN', tail: ' cm-1' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.UVVIS, { head: 'UV-VIS (absorption, solvent), λmax', tail: ' nm' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.HPLC_UVVIS, { head: 'HPLC UV/VIS (transmittance)', tail: '' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.TGA, { head: 'THERMOGRAVIMETRIC ANALYSIS', tail: ' SECONDS' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.MS, { head: 'MASS', tail: ' m/z' }), _defineProperty(_spectraOps, _list_layout.LIST_LAYOUT.XRD, { head: 'X-RAY DIFFRACTION', tail: '.' }), _spectraOps);
|
|
66
66
|
|
|
67
67
|
var rmRef = function rmRef(peaks, shift) {
|
|
68
68
|
var refValue = shift.ref.value || shift.peak.x;
|
|
@@ -181,8 +181,10 @@ var formatedUvVis = function formatedUvVis(peaks, maxY) {
|
|
|
181
181
|
return { x: k, y: ordered[k] };
|
|
182
182
|
});
|
|
183
183
|
|
|
184
|
+
// return ordered.map(o => `${o.x} (${o.y.toFixed(2)})`)
|
|
185
|
+
// .join(', ');
|
|
184
186
|
return ordered.map(function (o) {
|
|
185
|
-
return
|
|
187
|
+
return '' + o.x;
|
|
186
188
|
}).join(', ');
|
|
187
189
|
};
|
|
188
190
|
|