Skip to content

Commit 10145a1

Browse files
committed
Resolved missing trailing coma issue
1 parent 02e06e0 commit 10145a1

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

src/graph_spectrum.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
2121
analyserZoomY = 1.0 /* 100% */,
2222
dataReload = false,
2323
fftData = null,
24-
prefs = new PrefStorage();
25-
26-
this.dataBuffer = {
27-
fieldIndex: 0,
28-
curve: 0,
29-
fieldName: null,
30-
};
24+
prefs = new PrefStorage(),
25+
dataBuffer = {
26+
fieldIndex: 0,
27+
curve: 0,
28+
fieldName: null,
29+
};
3130

3231
try {
3332
let isFullscreen = false;
@@ -124,7 +123,7 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
124123
};
125124

126125
const dataLoad = function () {
127-
GraphSpectrumCalc.setDataBuffer(that.dataBuffer);
126+
GraphSpectrumCalc.setDataBuffer(dataBuffer);
128127
switch (userSettings.spectrumType) {
129128
case SPECTRUM_TYPE.FREQ_VS_THROTTLE:
130129
fftData = GraphSpectrumCalc.dataLoadFrequencyVsThrottle();
@@ -163,9 +162,9 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
163162
this.plotSpectrum = function (fieldIndex, curve, fieldName) {
164163
// Store the data pointers
165164

166-
that.dataBuffer.fieldIndex = fieldIndex;
167-
that.dataBuffer.curve = curve;
168-
that.dataBuffer.fieldName = fieldName;
165+
dataBuffer.fieldIndex = fieldIndex;
166+
dataBuffer.curve = curve;
167+
dataBuffer.fieldName = fieldName;
169168
// Detect change of selected field.... reload and redraw required.
170169
if (fftData == null || fieldIndex != fftData.fieldIndex || dataReload) {
171170
dataReload = false;
@@ -241,7 +240,7 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
241240
analyserMinPSDText.val(-40 + shift);
242241
analyserMaxPSDText.val(10 + shift);
243242
that.refresh();
244-
})
243+
}),
245244
).dblclick(function () {
246245
$(this).val(0).trigger("input");
247246
}).val(0);
@@ -258,7 +257,7 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
258257
lowLevel = dBmValueMin + (dBmValueMax - dBmValueMin) * lowLevelPercent / 100;
259258
analyserLowPSDText.val(lowLevel);
260259
that.refresh();
261-
})
260+
}),
262261
).dblclick(function () {
263262
$(this).val(0).trigger("input");
264263
}).val(0);
@@ -279,9 +278,9 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
279278
// Recalculate the data, for the same curve than now, and draw it
280279
dataReload = true;
281280
that.plotSpectrum(
282-
that.dataBuffer.fieldIndex,
283-
that.dataBuffer.curve,
284-
that.dataBuffer.fieldName,
281+
dataBuffer.fieldIndex,
282+
dataBuffer.curve,
283+
dataBuffer.fieldName,
285284
);
286285
}
287286

0 commit comments

Comments
 (0)