Skip to content

Commit 3a38b4f

Browse files
committed
Added debounce in analyserSegmentLengthPowerAt2.on handler
1 parent 8cec5a8 commit 3a38b4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/graph_spectrum.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,13 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
333333
analyserSegmentLengthPowerAt2
334334
.on(
335335
"input",
336-
function () {
336+
debounce(100, function () {
337337
// Recalculate PSD with updated samples per segment count
338338
GraphSpectrumCalc.setPointsPerSegmentPSD(2 ** Number.parseInt($(this).val()));
339339
dataLoad();
340340
GraphSpectrumPlot.setData(fftData, userSettings.spectrumType);
341341
that.refresh();
342-
},
342+
}),
343343
)
344344
.dblclick(function (e) {
345345
if (e.ctrlKey) {

0 commit comments

Comments
 (0)