Skip to content

Commit 64e0c25

Browse files
committed
Code refactoring
1 parent c32baba commit 64e0c25

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
@@ -242,11 +242,9 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
242242
analyserMaxPSDText.val(10 + shift);
243243
that.refresh();
244244
})
245-
)
246-
.dblclick(function () {
245+
).dblclick(function () {
247246
$(this).val(0).trigger("input");
248-
})
249-
.val(0);
247+
}).val(0);
250248

251249
analyserLowLevelPSDSlider
252250
.on(
@@ -261,11 +259,9 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
261259
analyserLowPSDText.val(lowLevel);
262260
that.refresh();
263261
})
264-
)
265-
.dblclick(function () {
262+
).dblclick(function () {
266263
$(this).val(0).trigger("input");
267-
})
268-
.val(0);
264+
}).val(0);
269265

270266
// Spectrum type to show
271267
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)