Skip to content

Commit 02a26f0

Browse files
committed
Code refactoring
1 parent 38f5694 commit 02a26f0

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

src/graph_spectrum.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,9 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
245245
analyserMaxPSDText.val(10 + shift);
246246
that.refresh();
247247
})
248-
)
249-
.dblclick(function () {
248+
).dblclick(function () {
250249
$(this).val(0).trigger("input");
251-
})
252-
.val(0);
250+
}).val(0);
253251

254252
analyserLowLevelPSDSlider
255253
.on(
@@ -264,11 +262,9 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
264262
analyserLowPSDText.val(lowLevel);
265263
that.refresh();
266264
})
267-
)
268-
.dblclick(function () {
265+
).dblclick(function () {
269266
$(this).val(0).trigger("input");
270-
})
271-
.val(0);
267+
}).val(0);
272268

273269
// Spectrum type to show
274270
userSettings.spectrumType =

src/graph_spectrum_plot.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,7 @@ GraphSpectrumPlot._drawHeatMap = function (drawPSD = false) {
547547
valuePlot = Math.min(valuePlot, dBmValueMax);
548548
valuePlot = Math.round((valuePlot - dBmValueMin) * 100 / (dBmValueMax - dBmValueMin));
549549
} else {
550-
valuePlot = Math.round(
551-
Math.min(valuePlot * fftColorScale, 100)
552-
);
550+
valuePlot = Math.round(Math.min(valuePlot * fftColorScale, 100));
553551
}
554552

555553
// The fillStyle is slow, but I haven't found a way to do this faster...

0 commit comments

Comments
 (0)