@complat/react-spectra-editor 1.0.1-beta.2 → 1.1.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.
@@ -252,9 +252,9 @@ class LineFocus {
252
252
  this.grid.x.call(this.axisCall.x.tickSize(-this.h, 0, 0)).selectAll('line').attr('stroke', '#ddd').attr('stroke-opacity', 0.6).attr('fill', 'none');
253
253
  this.grid.y.call(this.axisCall.y.tickSize(-this.w, 0, 0)).selectAll('line').attr('stroke', '#ddd').attr('stroke-opacity', 0.6).attr('fill', 'none');
254
254
  }
255
- onClickTarget(data) {
256
- d3.event.stopPropagation();
257
- d3.event.preventDefault();
255
+ onClickTarget(event, data) {
256
+ event.stopPropagation();
257
+ event.preventDefault();
258
258
  const onPeak = true;
259
259
  this.clickUiTargetAct(data, onPeak);
260
260
  }
@@ -291,15 +291,15 @@ class LineFocus {
291
291
  return yt(0);
292
292
  }).y1(d => yt(d.y))(ps);
293
293
  };
294
- auc.enter().append('path').attr('class', 'auc').attr('fill', 'red').attr('stroke', 'none').attr('fill-opacity', 0.2).attr('stroke-width', 2).merge(auc).attr('d', d => integCurve(d)).attr('id', d => `auc${(0, _focus.itgIdTag)(d)}`).on('mouseover', d => {
294
+ auc.enter().append('path').attr('class', 'auc').attr('fill', 'red').attr('stroke', 'none').attr('fill-opacity', 0.2).attr('stroke-width', 2).merge(auc).attr('d', d => integCurve(d)).attr('id', d => `auc${(0, _focus.itgIdTag)(d)}`).on('mouseover', (event, d) => {
295
295
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
296
296
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
297
297
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).style('fill', 'blue');
298
- }).on('mouseout', d => {
298
+ }).on('mouseout', (event, d) => {
299
299
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'none');
300
300
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).style('fill', 'red');
301
301
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).style('fill-opacity', 0.2);
302
- }).on('click', d => this.onClickTarget(d));
302
+ }).on('click', (event, d) => this.onClickTarget(event, d));
303
303
  }
304
304
  drawPeaks(editPeakSt) {
305
305
  const {
@@ -333,28 +333,28 @@ class LineFocus {
333
333
  }];
334
334
  // const faktor = layoutSt === LIST_LAYOUT.IR ? -1 : 1;
335
335
  const lineSymbol = d3.line().x(d => d.x).y(d => d.y)(linePath);
336
- mpp.enter().append('path').attr('d', lineSymbol).attr('class', 'enter-peak').attr('fill', 'red').attr('stroke', 'pink').attr('stroke-width', 3).attr('stroke-opacity', 0.0).merge(mpp).attr('id', d => `mpp${Math.round(1000 * d.x)}`).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y)})`).on('mouseover', (d, i, n) => {
336
+ mpp.enter().append('path').attr('d', lineSymbol).attr('class', 'enter-peak').attr('fill', 'red').attr('stroke', 'pink').attr('stroke-width', 3).attr('stroke-opacity', 0.0).merge(mpp).attr('id', d => `mpp${Math.round(1000 * d.x)}`).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y)})`).on('mouseover', (event, d) => {
337
337
  d3.select(`#mpp${Math.round(1000 * d.x)}`).attr('stroke-opacity', '1.0');
338
338
  d3.select(`#bpt${Math.round(1000 * d.x)}`).style('fill', 'blue');
339
339
  const tipParams = {
340
340
  d,
341
341
  layout: this.layout
342
342
  };
343
- this.tip.show(tipParams, n[i]);
344
- }).on('mouseout', (d, i, n) => {
343
+ this.tip.show(tipParams, event.target);
344
+ }).on('mouseout', (event, d) => {
345
345
  d3.select(`#mpp${Math.round(1000 * d.x)}`).attr('stroke-opacity', '0.0');
346
346
  d3.select(`#bpt${Math.round(1000 * d.x)}`).style('fill', 'red');
347
347
  const tipParams = {
348
348
  d,
349
349
  layout: this.layout
350
350
  };
351
- this.tip.hide(tipParams, n[i]);
352
- }).on('click', d => this.onClickTarget(d));
351
+ this.tip.hide(tipParams, event.target);
352
+ }).on('click', (event, d) => this.onClickTarget(event, d));
353
353
  const ignoreRef = _format.default.isHplcUvVisLayout(this.layout);
354
354
  if (ignoreRef) {
355
355
  const bpTxt = this.tags.bpTxt.selectAll('text').data(dPks);
356
356
  bpTxt.exit().attr('class', 'exit').remove();
357
- bpTxt.enter().append('text').attr('class', 'peak-text').attr('font-family', 'Helvetica').style('font-size', '12px').attr('fill', '#228B22').style('text-anchor', 'middle').merge(bpTxt).attr('id', d => `mpp${Math.round(1000 * d.x)}`).text(d => d.x.toFixed(2)).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y) - 25})`).on('click', d => this.onClickTarget(d));
357
+ bpTxt.enter().append('text').attr('class', 'peak-text').attr('font-family', 'Helvetica').style('font-size', '12px').attr('fill', '#228B22').style('text-anchor', 'middle').merge(bpTxt).attr('id', d => `mpp${Math.round(1000 * d.x)}`).text(d => d.x.toFixed(2)).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y) - 25})`).on('click', (event, d) => this.onClickTarget(event, d));
358
358
  }
359
359
  }
360
360
  drawInteg(integationSt) {
@@ -401,15 +401,15 @@ class LineFocus {
401
401
  } = (0, _compass.TfRescale)(this);
402
402
  const dh = 50;
403
403
  const integBar = data => d3.line()([[xt(data.xL - shift), dh], [xt(data.xL - shift), dh - 10], [xt(data.xL - shift), dh - 5], [xt(data.xU - shift), dh - 5], [xt(data.xU - shift), dh - 10], [xt(data.xU - shift), dh]]);
404
- igbp.enter().append('path').attr('class', 'igbp').attr('fill', 'none').attr('stroke', '#228B22').attr('stroke-width', 2).merge(igbp).attr('id', d => `igbp${(0, _focus.itgIdTag)(d)}`).attr('d', d => integBar(d)).on('mouseover', d => {
404
+ igbp.enter().append('path').attr('class', 'igbp').attr('fill', 'none').attr('stroke', '#228B22').attr('stroke-width', 2).merge(igbp).attr('id', d => `igbp${(0, _focus.itgIdTag)(d)}`).attr('d', d => integBar(d)).on('mouseover', (event, d) => {
405
405
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
406
406
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
407
407
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', 'blue');
408
- }).on('mouseout', d => {
408
+ }).on('mouseout', (event, d) => {
409
409
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
410
410
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
411
411
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', '#228B22');
412
- }).on('click', d => this.onClickTarget(d));
412
+ }).on('click', (event, d) => this.onClickTarget(event, d));
413
413
  const integCurve = border => {
414
414
  const {
415
415
  xL,
@@ -425,24 +425,24 @@ class LineFocus {
425
425
  }
426
426
  return d3.line().x(d => xt(d.x)).y(d => 300 - (d.k - kRef) * 400 / kMax)(ps);
427
427
  };
428
- igcp.enter().append('path').attr('class', 'igcp').attr('fill', 'none').attr('stroke', '#228B22').attr('stroke-width', 2).merge(igcp).attr('id', d => `igbc${(0, _focus.itgIdTag)(d)}`).attr('d', d => integCurve(d)).on('mouseover', d => {
428
+ igcp.enter().append('path').attr('class', 'igcp').attr('fill', 'none').attr('stroke', '#228B22').attr('stroke-width', 2).merge(igcp).attr('id', d => `igbc${(0, _focus.itgIdTag)(d)}`).attr('d', d => integCurve(d)).on('mouseover', (event, d) => {
429
429
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
430
430
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
431
431
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', 'blue');
432
- }).on('mouseout', d => {
432
+ }).on('mouseout', (event, d) => {
433
433
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
434
434
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
435
435
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', '#228B22');
436
- }).on('click', d => this.onClickTarget(d));
437
- igtp.enter().append('text').attr('class', 'igtp').attr('font-family', 'Helvetica').style('font-size', '12px').attr('fill', '#228B22').style('text-anchor', 'middle').merge(igtp).attr('id', d => `igtp${(0, _focus.itgIdTag)(d)}`).text(d => (0, _integration.calcArea)(d, refArea, refFactor, ignoreRef)).attr('transform', d => `translate(${xt((d.xL + d.xU) / 2 - shift)}, ${dh - 12})`).on('mouseover', d => {
436
+ }).on('click', (event, d) => this.onClickTarget(event, d));
437
+ igtp.enter().append('text').attr('class', 'igtp').attr('font-family', 'Helvetica').style('font-size', '12px').attr('fill', '#228B22').style('text-anchor', 'middle').merge(igtp).attr('id', d => `igtp${(0, _focus.itgIdTag)(d)}`).text(d => (0, _integration.calcArea)(d, refArea, refFactor, ignoreRef)).attr('transform', d => `translate(${xt((d.xL + d.xU) / 2 - shift)}, ${dh - 12})`).on('mouseover', (event, d) => {
438
438
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
439
439
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
440
440
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', 'blue');
441
- }).on('mouseout', d => {
441
+ }).on('mouseout', (event, d) => {
442
442
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
443
443
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
444
444
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', '#228B22');
445
- }).on('click', d => this.onClickTarget(d));
445
+ }).on('click', (event, d) => this.onClickTarget(event, d));
446
446
  }
447
447
  }
448
448
  drawMtply(mtplySt) {
@@ -497,42 +497,42 @@ class LineFocus {
497
497
  } = d.xExtent;
498
498
  return smExtext.xL === xL && smExtext.xU === xU ? 'purple' : '#DA70D6';
499
499
  };
500
- mpyb.enter().append('path').attr('class', 'mpyb').attr('fill', 'none').attr('stroke-width', 2).merge(mpyb).attr('stroke', d => mpyColor(d)).attr('id', d => `mpyb${(0, _focus.mpyIdTag)(d)}`).attr('d', d => mpyBar(d)).on('mouseover', d => {
500
+ mpyb.enter().append('path').attr('class', 'mpyb').attr('fill', 'none').attr('stroke-width', 2).merge(mpyb).attr('stroke', d => mpyColor(d)).attr('id', d => `mpyb${(0, _focus.mpyIdTag)(d)}`).attr('d', d => mpyBar(d)).on('mouseover', (event, d) => {
501
501
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
502
502
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
503
503
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
504
504
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
505
- }).on('mouseout', d => {
505
+ }).on('mouseout', (event, d) => {
506
506
  const dColor = mpyColor(d);
507
507
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
508
508
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
509
509
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
510
510
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
511
- }).on('click', d => this.onClickTarget(d));
512
- mpyt1.enter().append('text').attr('class', 'mpyt1').attr('font-family', 'Helvetica').style('font-size', '12px').style('text-anchor', 'middle').merge(mpyt1).attr('fill', d => mpyColor(d)).attr('id', d => `mpyt1${(0, _focus.mpyIdTag)(d)}`).text(d => `${(0, _multiplicity_calc.calcMpyCenter)(d.peaks, shift, d.mpyType).toFixed(3)}`).attr('transform', d => `translate(${xt((d.xExtent.xL + d.xExtent.xU) / 2 - shift)}, ${height - dh + 12})`).on('mouseover', d => {
511
+ }).on('click', (event, d) => this.onClickTarget(event, d));
512
+ mpyt1.enter().append('text').attr('class', 'mpyt1').attr('font-family', 'Helvetica').style('font-size', '12px').style('text-anchor', 'middle').merge(mpyt1).attr('fill', d => mpyColor(d)).attr('id', d => `mpyt1${(0, _focus.mpyIdTag)(d)}`).text(d => `${(0, _multiplicity_calc.calcMpyCenter)(d.peaks, shift, d.mpyType).toFixed(3)}`).attr('transform', d => `translate(${xt((d.xExtent.xL + d.xExtent.xU) / 2 - shift)}, ${height - dh + 12})`).on('mouseover', (event, d) => {
513
513
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
514
514
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
515
515
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
516
516
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
517
- }).on('mouseout', d => {
517
+ }).on('mouseout', (event, d) => {
518
518
  const dColor = mpyColor(d);
519
519
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
520
520
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
521
521
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
522
522
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
523
- }).on('click', d => this.onClickTarget(d));
524
- mpyt2.enter().append('text').attr('class', 'mpyt2').attr('font-family', 'Helvetica').style('font-size', '12px').style('text-anchor', 'middle').merge(mpyt2).attr('fill', d => mpyColor(d)).attr('id', d => `mpyt2${(0, _focus.mpyIdTag)(d)}`).text(d => `(${d.mpyType})`).attr('transform', d => `translate(${xt((d.xExtent.xL + d.xExtent.xU) / 2 - shift)}, ${height - dh + 24})`).on('mouseover', d => {
523
+ }).on('click', (event, d) => this.onClickTarget(event, d));
524
+ mpyt2.enter().append('text').attr('class', 'mpyt2').attr('font-family', 'Helvetica').style('font-size', '12px').style('text-anchor', 'middle').merge(mpyt2).attr('fill', d => mpyColor(d)).attr('id', d => `mpyt2${(0, _focus.mpyIdTag)(d)}`).text(d => `(${d.mpyType})`).attr('transform', d => `translate(${xt((d.xExtent.xL + d.xExtent.xU) / 2 - shift)}, ${height - dh + 24})`).on('mouseover', (event, d) => {
525
525
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
526
526
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
527
527
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
528
528
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
529
- }).on('mouseout', d => {
529
+ }).on('mouseout', (event, d) => {
530
530
  const dColor = mpyColor(d);
531
531
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
532
532
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
533
533
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
534
534
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
535
- }).on('click', d => this.onClickTarget(d));
535
+ }).on('click', (event, d) => this.onClickTarget(event, d));
536
536
  const mpypH = height - dh;
537
537
  const mpypPath = pk => [{
538
538
  x: xt(pk.x - shift) - 0.5,
@@ -549,18 +549,18 @@ class LineFocus {
549
549
  }];
550
550
  // const faktor = layoutSt === LIST_LAYOUT.IR ? -1 : 1;
551
551
  const lineSymbol = d3.line().x(d => d.x).y(d => d.y);
552
- mpyp.enter().append('path').attr('class', 'mpyp').attr('fill', 'none').merge(mpyp).attr('stroke', d => mpyColor(d)).attr('d', d => lineSymbol(mpypPath(d))).attr('id', d => `mpyp${(0, _focus.mpyIdTag)(d)}`).on('mouseover', d => {
552
+ mpyp.enter().append('path').attr('class', 'mpyp').attr('fill', 'none').merge(mpyp).attr('stroke', d => mpyColor(d)).attr('d', d => lineSymbol(mpypPath(d))).attr('id', d => `mpyp${(0, _focus.mpyIdTag)(d)}`).on('mouseover', (event, d) => {
553
553
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
554
554
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
555
555
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
556
556
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
557
- }).on('mouseout', d => {
557
+ }).on('mouseout', (event, d) => {
558
558
  const dColor = mpyColor(d);
559
559
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
560
560
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
561
561
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
562
562
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
563
- }).on('click', d => this.onClickTarget(d));
563
+ }).on('click', (event, d) => this.onClickTarget(event, d));
564
564
  }
565
565
  drawRef() {
566
566
  // rescale for zoom
@@ -284,9 +284,9 @@ class MultiFocus {
284
284
  this.grid.x.call(this.axisCall.x.tickSize(-this.h, 0, 0)).selectAll('line').attr('stroke', '#ddd').attr('stroke-opacity', 0.6).attr('fill', 'none');
285
285
  this.grid.y.call(this.axisCall.y.tickSize(-this.w, 0, 0)).selectAll('line').attr('stroke', '#ddd').attr('stroke-opacity', 0.6).attr('fill', 'none');
286
286
  }
287
- onClickTarget(data) {
288
- d3.event.stopPropagation();
289
- d3.event.preventDefault();
287
+ onClickTarget(event, data) {
288
+ event.stopPropagation();
289
+ event.preventDefault();
290
290
  const onPeak = true;
291
291
  if (this.layout === _list_layout.LIST_LAYOUT.CYCLIC_VOLTAMMETRY) {
292
292
  const {
@@ -299,9 +299,9 @@ class MultiFocus {
299
299
  this.clickUiTargetAct(data, onPeak, false, this.jcampIdx);
300
300
  }
301
301
  }
302
- onClickPecker(data) {
303
- d3.event.stopPropagation();
304
- d3.event.preventDefault();
302
+ onClickPecker(event, data) {
303
+ event.stopPropagation();
304
+ event.preventDefault();
305
305
  const onPecker = true;
306
306
  const {
307
307
  spectraList
@@ -365,15 +365,15 @@ class MultiFocus {
365
365
  return yt(0);
366
366
  }).y1(d => yt(d.y))(ps);
367
367
  };
368
- auc.enter().append('path').attr('class', 'auc').attr('fill', 'red').attr('stroke', 'none').attr('fill-opacity', 0.2).attr('stroke-width', 2).merge(auc).attr('d', d => integCurve(d)).attr('id', d => `auc${(0, _focus.itgIdTag)(d)}`).on('mouseover', d => {
368
+ auc.enter().append('path').attr('class', 'auc').attr('fill', 'red').attr('stroke', 'none').attr('fill-opacity', 0.2).attr('stroke-width', 2).merge(auc).attr('d', d => integCurve(d)).attr('id', d => `auc${(0, _focus.itgIdTag)(d)}`).on('mouseover', (event, d) => {
369
369
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
370
370
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
371
371
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).style('fill', 'blue');
372
- }).on('mouseout', d => {
372
+ }).on('mouseout', (event, d) => {
373
373
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'none');
374
374
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).style('fill', 'red');
375
375
  d3.select(`#auc${(0, _focus.itgIdTag)(d)}`).style('fill-opacity', 0.2);
376
- }).on('click', d => this.onClickTarget(d));
376
+ }).on('click', (event, d) => this.onClickTarget(event, d));
377
377
  }
378
378
  drawPeaks(editPeakSt) {
379
379
  const {
@@ -406,28 +406,28 @@ class MultiFocus {
406
406
  y: 10
407
407
  }];
408
408
  const lineSymbol = d3.line().x(d => d.x).y(d => d.y)(linePath);
409
- mpp.enter().append('path').attr('d', lineSymbol).attr('class', 'enter-peak').attr('fill', 'red').attr('stroke', 'pink').attr('stroke-width', 3).attr('stroke-opacity', 0.0).merge(mpp).attr('id', d => `mpp${Math.round(1000 * d.x)}`).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y)})`).on('mouseover', (d, i, n) => {
409
+ mpp.enter().append('path').attr('d', lineSymbol).attr('class', 'enter-peak').attr('fill', 'red').attr('stroke', 'pink').attr('stroke-width', 3).attr('stroke-opacity', 0.0).merge(mpp).attr('id', d => `mpp${Math.round(1000 * d.x)}`).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y)})`).on('mouseover', (event, d) => {
410
410
  d3.select(`#mpp${Math.round(1000 * d.x)}`).attr('stroke-opacity', '1.0');
411
411
  d3.select(`#bpt${Math.round(1000 * d.x)}`).style('fill', 'blue');
412
412
  const tipParams = {
413
413
  d,
414
414
  layout: this.layout
415
415
  };
416
- this.tip.show(tipParams, n[i]);
417
- }).on('mouseout', (d, i, n) => {
416
+ this.tip.show(tipParams, event.target);
417
+ }).on('mouseout', (event, d) => {
418
418
  d3.select(`#mpp${Math.round(1000 * d.x)}`).attr('stroke-opacity', '0.0');
419
419
  d3.select(`#bpt${Math.round(1000 * d.x)}`).style('fill', 'red');
420
420
  const tipParams = {
421
421
  d,
422
422
  layout: this.layout
423
423
  };
424
- this.tip.hide(tipParams, n[i]);
425
- }).on('click', d => this.onClickTarget(d));
424
+ this.tip.hide(tipParams, event.target);
425
+ }).on('click', (event, d) => this.onClickTarget(event, d));
426
426
  const ignoreRef = _format.default.isHplcUvVisLayout(this.layout);
427
427
  if (ignoreRef) {
428
428
  const bpTxt = this.tags.bpTxt.selectAll('text').data(dPks);
429
429
  bpTxt.exit().attr('class', 'exit').remove();
430
- bpTxt.enter().append('text').attr('class', 'peak-text').attr('font-family', 'Helvetica').style('font-size', '12px').attr('fill', '#228B22').style('text-anchor', 'middle').merge(bpTxt).attr('id', d => `mpp${Math.round(1000 * d.x)}`).text(d => d.x.toFixed(2)).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y) - 25})`).on('click', d => this.onClickTarget(d));
430
+ bpTxt.enter().append('text').attr('class', 'peak-text').attr('font-family', 'Helvetica').style('font-size', '12px').attr('fill', '#228B22').style('text-anchor', 'middle').merge(bpTxt).attr('id', d => `mpp${Math.round(1000 * d.x)}`).text(d => d.x.toFixed(2)).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y) - 25})`).on('click', (event, d) => this.onClickTarget(event, d));
431
431
  }
432
432
  }
433
433
  drawPeckers() {
@@ -461,23 +461,23 @@ class MultiFocus {
461
461
  y: 10
462
462
  }];
463
463
  const lineSymbol = d3.line().x(d => d.x).y(d => d.y)(linePath);
464
- mpp.enter().append('path').attr('d', lineSymbol).attr('class', 'enter-peak').attr('fill', '#228B22').attr('stroke', 'pink').attr('stroke-width', 3).attr('stroke-opacity', 0.0).merge(mpp).attr('id', d => `mpp${Math.round(1000 * d.x)}`).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y)})`).on('mouseover', (d, i, n) => {
464
+ mpp.enter().append('path').attr('d', lineSymbol).attr('class', 'enter-peak').attr('fill', '#228B22').attr('stroke', 'pink').attr('stroke-width', 3).attr('stroke-opacity', 0.0).merge(mpp).attr('id', d => `mpp${Math.round(1000 * d.x)}`).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y)})`).on('mouseover', (event, d) => {
465
465
  d3.select(`#mpp${Math.round(1000 * d.x)}`).attr('stroke-opacity', '1.0');
466
466
  d3.select(`#bpt${Math.round(1000 * d.x)}`).style('fill', 'blue');
467
467
  const tipParams = {
468
468
  d,
469
469
  layout: this.layout
470
470
  };
471
- this.tip.show(tipParams, n[i]);
472
- }).on('mouseout', (d, i, n) => {
471
+ this.tip.show(tipParams, event.target);
472
+ }).on('mouseout', (event, d) => {
473
473
  d3.select(`#mpp${Math.round(1000 * d.x)}`).attr('stroke-opacity', '0.0');
474
474
  d3.select(`#bpt${Math.round(1000 * d.x)}`).style('fill', '#228B22');
475
475
  const tipParams = {
476
476
  d,
477
477
  layout: this.layout
478
478
  };
479
- this.tip.hide(tipParams, n[i]);
480
- }).on('click', d => this.onClickPecker(d));
479
+ this.tip.hide(tipParams, event.target);
480
+ }).on('click', (event, d) => this.onClickPecker(event, d));
481
481
  }
482
482
  drawInteg(integationSt) {
483
483
  const {
@@ -532,15 +532,15 @@ class MultiFocus {
532
532
  } = (0, _compass.TfRescale)(this);
533
533
  const dh = 50;
534
534
  const integBar = data => d3.line()([[xt(data.xL - shift), dh], [xt(data.xL - shift), dh - 10], [xt(data.xL - shift), dh - 5], [xt(data.xU - shift), dh - 5], [xt(data.xU - shift), dh - 10], [xt(data.xU - shift), dh]]);
535
- igbp.enter().append('path').attr('class', 'igbp').attr('fill', 'none').attr('stroke', '#228B22').attr('stroke-width', 2).merge(igbp).attr('id', d => `igbp${(0, _focus.itgIdTag)(d)}`).attr('d', d => integBar(d)).on('mouseover', d => {
535
+ igbp.enter().append('path').attr('class', 'igbp').attr('fill', 'none').attr('stroke', '#228B22').attr('stroke-width', 2).merge(igbp).attr('id', d => `igbp${(0, _focus.itgIdTag)(d)}`).attr('d', d => integBar(d)).on('mouseover', (event, d) => {
536
536
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
537
537
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
538
538
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', 'blue');
539
- }).on('mouseout', d => {
539
+ }).on('mouseout', (event, d) => {
540
540
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
541
541
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
542
542
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', '#228B22');
543
- }).on('click', d => this.onClickTarget(d));
543
+ }).on('click', (event, d) => this.onClickTarget(event, d));
544
544
  const integCurve = border => {
545
545
  const {
546
546
  xL,
@@ -556,24 +556,24 @@ class MultiFocus {
556
556
  }
557
557
  return d3.line().x(d => xt(d.x)).y(d => 300 - (d.k - kRef) * 400 / kMax)(ps);
558
558
  };
559
- igcp.enter().append('path').attr('class', 'igcp').attr('fill', 'none').attr('stroke', '#228B22').attr('stroke-width', 2).merge(igcp).attr('id', d => `igbc${(0, _focus.itgIdTag)(d)}`).attr('d', d => integCurve(d)).on('mouseover', d => {
559
+ igcp.enter().append('path').attr('class', 'igcp').attr('fill', 'none').attr('stroke', '#228B22').attr('stroke-width', 2).merge(igcp).attr('id', d => `igbc${(0, _focus.itgIdTag)(d)}`).attr('d', d => integCurve(d)).on('mouseover', (event, d) => {
560
560
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
561
561
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
562
562
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', 'blue');
563
- }).on('mouseout', d => {
563
+ }).on('mouseout', (event, d) => {
564
564
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
565
565
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
566
566
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', '#228B22');
567
- }).on('click', d => this.onClickTarget(d));
568
- igtp.enter().append('text').attr('class', 'igtp').attr('font-family', 'Helvetica').style('font-size', '12px').attr('fill', '#228B22').style('text-anchor', 'middle').merge(igtp).attr('id', d => `igtp${(0, _focus.itgIdTag)(d)}`).text(d => (0, _integration.calcArea)(d, refArea, refFactor, ignoreRef)).attr('transform', d => `translate(${xt((d.xL + d.xU) / 2 - shift)}, ${dh - 12})`).on('mouseover', d => {
567
+ }).on('click', (event, d) => this.onClickTarget(event, d));
568
+ igtp.enter().append('text').attr('class', 'igtp').attr('font-family', 'Helvetica').style('font-size', '12px').attr('fill', '#228B22').style('text-anchor', 'middle').merge(igtp).attr('id', d => `igtp${(0, _focus.itgIdTag)(d)}`).text(d => (0, _integration.calcArea)(d, refArea, refFactor, ignoreRef)).attr('transform', d => `translate(${xt((d.xL + d.xU) / 2 - shift)}, ${dh - 12})`).on('mouseover', (event, d) => {
569
569
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
570
570
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', 'blue');
571
571
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', 'blue');
572
- }).on('mouseout', d => {
572
+ }).on('mouseout', (event, d) => {
573
573
  d3.select(`#igbp${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
574
574
  d3.select(`#igbc${(0, _focus.itgIdTag)(d)}`).attr('stroke', '#228B22');
575
575
  d3.select(`#igtp${(0, _focus.itgIdTag)(d)}`).style('fill', '#228B22');
576
- }).on('click', d => this.onClickTarget(d));
576
+ }).on('click', (event, d) => this.onClickTarget(event, d));
577
577
  }
578
578
  }
579
579
  drawMtply(mtplySt) {
@@ -649,42 +649,42 @@ class MultiFocus {
649
649
  } = d.xExtent;
650
650
  return smExtext.xL === xL && smExtext.xU === xU ? 'purple' : '#DA70D6';
651
651
  };
652
- mpyb.enter().append('path').attr('class', 'mpyb').attr('fill', 'none').attr('stroke-width', 2).merge(mpyb).attr('stroke', d => mpyColor(d)).attr('id', d => `mpyb${(0, _focus.mpyIdTag)(d)}`).attr('d', d => mpyBar(d)).on('mouseover', d => {
652
+ mpyb.enter().append('path').attr('class', 'mpyb').attr('fill', 'none').attr('stroke-width', 2).merge(mpyb).attr('stroke', d => mpyColor(d)).attr('id', d => `mpyb${(0, _focus.mpyIdTag)(d)}`).attr('d', d => mpyBar(d)).on('mouseover', (event, d) => {
653
653
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
654
654
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
655
655
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
656
656
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
657
- }).on('mouseout', d => {
657
+ }).on('mouseout', (event, d) => {
658
658
  const dColor = mpyColor(d);
659
659
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
660
660
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
661
661
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
662
662
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
663
- }).on('click', d => this.onClickTarget(d));
664
- mpyt1.enter().append('text').attr('class', 'mpyt1').attr('font-family', 'Helvetica').style('font-size', '12px').style('text-anchor', 'middle').merge(mpyt1).attr('fill', d => mpyColor(d)).attr('id', d => `mpyt1${(0, _focus.mpyIdTag)(d)}`).text(d => `${(0, _multiplicity_calc.calcMpyCenter)(d.peaks, shift, d.mpyType).toFixed(3)}`).attr('transform', d => `translate(${xt((d.xExtent.xL + d.xExtent.xU) / 2 - shift)}, ${height - dh + 12})`).on('mouseover', d => {
663
+ }).on('click', (event, d) => this.onClickTarget(event, d));
664
+ mpyt1.enter().append('text').attr('class', 'mpyt1').attr('font-family', 'Helvetica').style('font-size', '12px').style('text-anchor', 'middle').merge(mpyt1).attr('fill', d => mpyColor(d)).attr('id', d => `mpyt1${(0, _focus.mpyIdTag)(d)}`).text(d => `${(0, _multiplicity_calc.calcMpyCenter)(d.peaks, shift, d.mpyType).toFixed(3)}`).attr('transform', d => `translate(${xt((d.xExtent.xL + d.xExtent.xU) / 2 - shift)}, ${height - dh + 12})`).on('mouseover', (event, d) => {
665
665
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
666
666
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
667
667
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
668
668
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
669
- }).on('mouseout', d => {
669
+ }).on('mouseout', (event, d) => {
670
670
  const dColor = mpyColor(d);
671
671
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
672
672
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
673
673
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
674
674
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
675
- }).on('click', d => this.onClickTarget(d));
676
- mpyt2.enter().append('text').attr('class', 'mpyt2').attr('font-family', 'Helvetica').style('font-size', '12px').style('text-anchor', 'middle').merge(mpyt2).attr('fill', d => mpyColor(d)).attr('id', d => `mpyt2${(0, _focus.mpyIdTag)(d)}`).text(d => `(${d.mpyType})`).attr('transform', d => `translate(${xt((d.xExtent.xL + d.xExtent.xU) / 2 - shift)}, ${height - dh + 24})`).on('mouseover', d => {
675
+ }).on('click', (event, d) => this.onClickTarget(event, d));
676
+ mpyt2.enter().append('text').attr('class', 'mpyt2').attr('font-family', 'Helvetica').style('font-size', '12px').style('text-anchor', 'middle').merge(mpyt2).attr('fill', d => mpyColor(d)).attr('id', d => `mpyt2${(0, _focus.mpyIdTag)(d)}`).text(d => `(${d.mpyType})`).attr('transform', d => `translate(${xt((d.xExtent.xL + d.xExtent.xU) / 2 - shift)}, ${height - dh + 24})`).on('mouseover', (event, d) => {
677
677
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
678
678
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
679
679
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
680
680
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
681
- }).on('mouseout', d => {
681
+ }).on('mouseout', (event, d) => {
682
682
  const dColor = mpyColor(d);
683
683
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
684
684
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
685
685
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
686
686
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
687
- }).on('click', d => this.onClickTarget(d));
687
+ }).on('click', (event, d) => this.onClickTarget(event, d));
688
688
  const mpypH = height - dh;
689
689
  const mpypPath = pk => [{
690
690
  x: xt(pk.x - shift) - 0.5,
@@ -701,18 +701,18 @@ class MultiFocus {
701
701
  }];
702
702
  // const faktor = layoutSt === LIST_LAYOUT.IR ? -1 : 1;
703
703
  const lineSymbol = d3.line().x(d => d.x).y(d => d.y);
704
- mpyp.enter().append('path').attr('class', 'mpyp').attr('fill', 'none').merge(mpyp).attr('stroke', d => mpyColor(d)).attr('d', d => lineSymbol(mpypPath(d))).attr('id', d => `mpyp${(0, _focus.mpyIdTag)(d)}`).on('mouseover', d => {
704
+ mpyp.enter().append('path').attr('class', 'mpyp').attr('fill', 'none').merge(mpyp).attr('stroke', d => mpyColor(d)).attr('d', d => lineSymbol(mpypPath(d))).attr('id', d => `mpyp${(0, _focus.mpyIdTag)(d)}`).on('mouseover', (event, d) => {
705
705
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
706
706
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
707
707
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', 'blue');
708
708
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', 'blue');
709
- }).on('mouseout', d => {
709
+ }).on('mouseout', (event, d) => {
710
710
  const dColor = mpyColor(d);
711
711
  d3.selectAll(`#mpyb${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
712
712
  d3.selectAll(`#mpyt1${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
713
713
  d3.selectAll(`#mpyt2${(0, _focus.mpyIdTag)(d)}`).style('fill', dColor);
714
714
  d3.selectAll(`#mpyp${(0, _focus.mpyIdTag)(d)}`).attr('stroke', dColor);
715
- }).on('click', d => this.onClickTarget(d));
715
+ }).on('click', (event, d) => this.onClickTarget(event, d));
716
716
  }
717
717
  drawRef() {
718
718
  // rescale for zoom
@@ -136,22 +136,22 @@ class RectFocus {
136
136
  const bars = this.bars.selectAll('rect').data(this.data);
137
137
  bars.exit().attr('class', 'exit').remove();
138
138
  const gnd = yt(0);
139
- bars.enter().append('rect').attr('class', 'enter-bar').attr('width', 1.5).merge(bars).attr('fill', d => this.barColor(d.y, yRef)).attr('height', d => this.posHeight(gnd, yt(d.y))).attr('id', d => `mpp${Math.round(1000 * d.x)}`).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y)})`).on('mouseover', (d, i, n) => {
139
+ bars.enter().append('rect').attr('class', 'enter-bar').attr('width', 1.5).merge(bars).attr('fill', d => this.barColor(d.y, yRef)).attr('height', d => this.posHeight(gnd, yt(d.y))).attr('id', d => `mpp${Math.round(1000 * d.x)}`).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y)})`).on('mouseover', (event, d) => {
140
140
  d3.select(`#mpp${Math.round(1000 * d.x)}`).attr('stroke-opacity', '1.0');
141
141
  d3.select(`#bpt${Math.round(1000 * d.x)}`).style('fill', 'blue');
142
142
  const tipParams = {
143
143
  d,
144
144
  layout: this.layout
145
145
  };
146
- this.tip.show(tipParams, n[i]);
147
- }).on('mouseout', (d, i, n) => {
146
+ this.tip.show(tipParams, event.target);
147
+ }).on('mouseout', (event, d) => {
148
148
  d3.select(`#mpp${Math.round(1000 * d.x)}`).attr('stroke-opacity', '1.0');
149
149
  d3.select(`#bpt${Math.round(1000 * d.x)}`).style('fill', 'red');
150
150
  const tipParams = {
151
151
  d,
152
152
  layout: this.layout
153
153
  };
154
- this.tip.hide(tipParams, n[i]);
154
+ this.tip.hide(tipParams, event.target);
155
155
  });
156
156
  }
157
157
  drawThres() {
@@ -171,7 +171,9 @@ const CyclicVoltammetryPanel = _ref => {
171
171
  }),
172
172
  onCheckRefChanged: e => changeCheckRefPeaks(idx, e)
173
173
  }));
174
- return /*#__PURE__*/_react.default.createElement(_material.Accordion, null, /*#__PURE__*/_react.default.createElement(_material.AccordionSummary, {
174
+ return /*#__PURE__*/_react.default.createElement(_material.Accordion, {
175
+ "data-testid": "PanelVoltammetry"
176
+ }, /*#__PURE__*/_react.default.createElement(_material.AccordionSummary, {
175
177
  expandIcon: /*#__PURE__*/_react.default.createElement(_ExpandMore.default, null),
176
178
  className: (0, _classnames.default)(classes.panelSummary)
177
179
  }, /*#__PURE__*/_react.default.createElement(_material.Typography, {
@@ -125,7 +125,8 @@ const InfoPanel = _ref => {
125
125
  theoryMass,
126
126
  onExapnd,
127
127
  canChangeDescription,
128
- onDescriptionChanged
128
+ onDescriptionChanged,
129
+ detectorSt
129
130
  } = _ref;
130
131
  if (!feature) return null;
131
132
  const {
@@ -136,6 +137,19 @@ const InfoPanel = _ref => {
136
137
  const {
137
138
  curveIdx
138
139
  } = curveSt;
140
+ const {
141
+ curves
142
+ } = detectorSt;
143
+ const getSelectedDetectorForCurve = (_detectorSt, targetCurveIdx) => {
144
+ const targetCurve = curves.find(curve => curve.curveIdx === targetCurveIdx);
145
+ return targetCurve ? targetCurve.selectedDetector.name : '';
146
+ };
147
+ let selectedDetector = getSelectedDetectorForCurve(detectorSt, curveIdx);
148
+
149
+ // default detector from jcamp
150
+ if (!selectedDetector && feature.detector) {
151
+ selectedDetector = feature.detector;
152
+ }
139
153
  const {
140
154
  shifts
141
155
  } = shiftSt;
@@ -190,7 +204,13 @@ const InfoPanel = _ref => {
190
204
  className: (0, _classnames.default)(classes.tTxt, classes.tHead, 'txt-sv-panel-txt')
191
205
  }, "Theoretical mass: "), /*#__PURE__*/_react.default.createElement("span", {
192
206
  className: (0, _classnames.default)(classes.tTxt, 'txt-sv-panel-txt')
193
- }, `${parseFloat(theoryMass).toFixed(6)} g/mol`)) : null, !molSvg ? null : /*#__PURE__*/_react.default.createElement(_reactSvgFileZoomPan.default, {
207
+ }, `${parseFloat(theoryMass).toFixed(6)} g/mol`)) : null, _format.default.isSECLayout(layoutSt) ? /*#__PURE__*/_react.default.createElement("div", {
208
+ className: (0, _classnames.default)(classes.rowRoot, classes.rowOdd)
209
+ }, /*#__PURE__*/_react.default.createElement("span", {
210
+ className: (0, _classnames.default)(classes.tTxt, classes.tHead, 'txt-sv-panel-txt')
211
+ }, "Detector: "), /*#__PURE__*/_react.default.createElement("span", {
212
+ className: (0, _classnames.default)(classes.tTxt, 'txt-sv-panel-txt')
213
+ }, selectedDetector)) : null, !molSvg ? null : /*#__PURE__*/_react.default.createElement(_reactSvgFileZoomPan.default, {
194
214
  svg: molSvg,
195
215
  duration: 300,
196
216
  resize: true
@@ -222,7 +242,8 @@ const mapStateToProps = (state, props) => (
222
242
  layoutSt: state.layout,
223
243
  simulationSt: state.simulation,
224
244
  shiftSt: state.shift,
225
- curveSt: state.curve
245
+ curveSt: state.curve,
246
+ detectorSt: state.detector
226
247
  });
227
248
  const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({}, dispatch);
228
249
  InfoPanel.propTypes = {
@@ -240,7 +261,8 @@ InfoPanel.propTypes = {
240
261
  onExapnd: _propTypes.default.func.isRequired,
241
262
  canChangeDescription: _propTypes.default.bool.isRequired,
242
263
  onDescriptionChanged: _propTypes.default.func,
243
- theoryMass: _propTypes.default.string
264
+ theoryMass: _propTypes.default.string,
265
+ detectorSt: _propTypes.default.object.isRequired
244
266
  };
245
267
  var _default = exports.default = (0, _reactRedux.connect)(
246
268
  // eslint-disable-line
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.XRD = exports.UI = exports.THRESHOLD = exports.SUBMIT = exports.STATUS = exports.SIMULATION = exports.SHIFT = exports.SCAN = exports.MULTIPLICITY = exports.META = exports.MANAGER = exports.LAYOUT = exports.JCAMP = exports.INTEGRATION = exports.FORECAST = exports.EDITPEAK = exports.CYCLIC_VOLTA_METRY = exports.CURVE = exports.AXES = void 0;
6
+ exports.XRD = exports.UI = exports.THRESHOLD = exports.SUBMIT = exports.STATUS = exports.SIMULATION = exports.SHIFT = exports.SEC = exports.SCAN = exports.MULTIPLICITY = exports.META = exports.MANAGER = exports.LAYOUT = exports.JCAMP = exports.INTEGRATION = exports.FORECAST = exports.EDITPEAK = exports.CYCLIC_VOLTA_METRY = exports.CURVE = exports.AXES = void 0;
7
7
  const THRESHOLD = exports.THRESHOLD = {
8
8
  UPDATE_VALUE: 'THRESHOLD_UPDATE_VALUE',
9
9
  RESET_VALUE: 'THRESHOLD_RESET_VALUE',
@@ -29,7 +29,8 @@ const MANAGER = exports.MANAGER = {
29
29
  RESET_INIT_COMMON: 'RESET_INIT_COMMON',
30
30
  RESET_INIT_NMR: 'RESET_INIT_NMR',
31
31
  RESET_INIT_MS: 'RESET_INIT_MS',
32
- RESET_INIT_COMMON_WITH_INTERGATION: 'RESET_INIT_COMMON_WITH_INTERGATION'
32
+ RESET_INIT_COMMON_WITH_INTERGATION: 'RESET_INIT_COMMON_WITH_INTERGATION',
33
+ RESET_DETECTOR: 'RESET_DETECTOR'
33
34
  };
34
35
  const LAYOUT = exports.LAYOUT = {
35
36
  UPDATE: 'UPDATE_LAYOUT'
@@ -139,4 +140,7 @@ const CURVE = exports.CURVE = {
139
140
  const AXES = exports.AXES = {
140
141
  UPDATE_X_AXIS: 'UPDATE_X_AXIS',
141
142
  UPDATE_Y_AXIS: 'UPDATE_Y_AXIS'
143
+ };
144
+ const SEC = exports.SEC = {
145
+ UPDATE_DETECTOR: 'UPDATE_DETECTOR'
142
146
  };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LIST_DETECTORS = void 0;
7
+ const rI = {
8
+ name: 'Refractive index',
9
+ label: 'RI'
10
+ };
11
+ const uV = {
12
+ name: 'Ultraviolet',
13
+ label: 'UV'
14
+ };
15
+ const LIST_DETECTORS = exports.LIST_DETECTORS = [rI, uV];