Skip to content

Commit bf5e4bd

Browse files
committed
Code refactoring
1 parent 9489e3e commit bf5e4bd

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

252250
analyserLowLevelPSDSlider
253251
.on(
@@ -262,11 +260,9 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
262260
analyserLowPSDText.val(lowLevel);
263261
that.refresh();
264262
})
265-
)
266-
.dblclick(function () {
263+
).dblclick(function () {
267264
$(this).val(0).trigger("input");
268-
})
269-
.val(0);
265+
}).val(0);
270266

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