Skip to content

Commit f3157a3

Browse files
committed
Code style improvement
1 parent 1044f5b commit f3157a3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/graph_imported_curves.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function ImportedCurves(curvesChanged) {
2-
const maxImportCount = 6; // This value is limited by legends size and curves colors visibility. May be increased if needed by users
2+
const MAX_IMPORT_COUNT = 6; // This value is limited by legends size and curves colors visibility. May be increased if needed by users
33
const _curvesData = [];
44
const _that = this;
55
this.minX = Number.MAX_VALUE;
@@ -20,7 +20,7 @@ export function ImportedCurves(curvesChanged) {
2020
};
2121

2222
this.importCurvesFromCSV = function(files) {
23-
let importsLeft = maxImportCount - _curvesData.length;
23+
let importsLeft = MAX_IMPORT_COUNT - _curvesData.length;
2424

2525
for (const file of files) {
2626
if (importsLeft-- == 0) {
@@ -105,7 +105,7 @@ export function ImportedCurves(curvesChanged) {
105105
};
106106

107107
this.addCurve = function(points, name) {
108-
if (this.curvesCount() < maxImportCount) {
108+
if (this.curvesCount() < MAX_IMPORT_COUNT) {
109109
const range = getCurveRange(points);
110110
_curvesData.push({
111111
name: name,
@@ -149,7 +149,7 @@ export function ImportedCurves(curvesChanged) {
149149
};
150150

151151
this.isFull = function() {
152-
return this.curvesCount() === maxImportCount;
152+
return this.curvesCount() === MAX_IMPORT_COUNT;
153153
};
154154

155155
this.isEmpty = function() {

src/graph_spectrum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
164164
};
165165

166166
this.shouldAddCurrentSpectrumBeforeReload = function () {
167-
return addSpectrumForComparison && fftData != null && !this.isMultiSpectrum() && !dataReload;
167+
return addSpectrumForComparison && fftData !== null && !this.isMultiSpectrum() && !dataReload;
168168
};
169169

170170
/* This function is called from the canvas drawing routines within grapher.js

0 commit comments

Comments
 (0)