Skip to content

Commit 27d8c15

Browse files
committed
Resolved issue of filters drawing at the PSD charts
1 parent 0be83fd commit 27d8c15

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/graph_spectrum_plot.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,9 @@ GraphSpectrumPlot._drawLowpassDynFilter = function (
13571357
// frequency2 line
13581358
const offsetByType =
13591359
this._spectrumType === SPECTRUM_TYPE.FREQ_VS_THROTTLE ||
1360-
this._spectrumType === SPECTRUM_TYPE.FREQ_VS_RPM
1360+
this._spectrumType === SPECTRUM_TYPE.FREQ_VS_RPM ||
1361+
this._spectrumType === SPECTRUM_TYPE.PSD_VS_THROTTLE ||
1362+
this._spectrumType === SPECTRUM_TYPE.PSD_VS_RPM
13611363
? 0
13621364
: OFFSET;
13631365
const x2 = this._drawVerticalMarkerLine(
@@ -1379,7 +1381,9 @@ GraphSpectrumPlot._drawLowpassDynFilter = function (
13791381

13801382
if (
13811383
this._spectrumType === SPECTRUM_TYPE.FREQ_VS_THROTTLE ||
1382-
this._spectrumType === SPECTRUM_TYPE.FREQ_VS_RPM
1384+
this._spectrumType === SPECTRUM_TYPE.FREQ_VS_RPM ||
1385+
this._spectrumType === SPECTRUM_TYPE.PSD_VS_THROTTLE ||
1386+
this._spectrumType === SPECTRUM_TYPE.PSD_VS_RPM
13831387
) {
13841388
/*
13851389
* It draws a curve:
@@ -1445,7 +1449,9 @@ GraphSpectrumPlot._drawNotchFilter = function (
14451449

14461450
if (
14471451
this._spectrumType === SPECTRUM_TYPE.FREQ_VS_THROTTLE ||
1448-
this._spectrumType === SPECTRUM_TYPE.FREQ_VS_RPM
1452+
this._spectrumType === SPECTRUM_TYPE.FREQ_VS_RPM ||
1453+
this._spectrumType === SPECTRUM_TYPE.PSD_VS_THROTTLE ||
1454+
this._spectrumType === SPECTRUM_TYPE.PSD_VS_RPM
14491455
) {
14501456
canvasCtx.moveTo(cutoffX, 0);
14511457
canvasCtx.lineTo(centerX * 2 - cutoffX, HEIGHT);

0 commit comments

Comments
 (0)