Skip to content

Commit 3445871

Browse files
committed
Added sceletion of code to add PSD curves into import list by press Insert key
1 parent fea0dc0 commit 3445871

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/graph_spectrum.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
438438
return fileName;
439439
};
440440

441+
this.addCurrentSpectrumIntoImport = function() {
442+
GraphSpectrumPlot.addCurrentSpectrumIntoImport();
443+
};
444+
441445
} catch (e) {
442446
console.error(`Failed to create analyser... error: ${e}`);
443447
}

src/graph_spectrum_plot.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,3 +1799,10 @@ GraphSpectrumPlot.removeImportedCurves = function() {
17991799
break;
18001800
}
18011801
};
1802+
1803+
GraphSpectrumPlot.addCurrentSpectrumIntoImport = function() {
1804+
if (this._spectrumType === SPECTRUM_TYPE.POWER_SPECTRAL_DENSITY) {
1805+
alert("The PSD curve is added into import");
1806+
}
1807+
};
1808+

src/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,6 +2454,12 @@ function BlackboxLogViewer() {
24542454
logJumpEnd();
24552455
e.preventDefault();
24562456
break;
2457+
case 45: // Insert key - add current spectrum PSD curve into import list
2458+
if (hasAnalyser) {
2459+
graph.getAnalyser().addCurrentSpectrumIntoImport();
2460+
}
2461+
e.preventDefault();
2462+
break;
24572463
}
24582464
}
24592465
});

0 commit comments

Comments
 (0)