@@ -29,18 +29,18 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
2929 try {
3030 let isFullscreen = false ;
3131
32- let sysConfig = flightLog . getSysConfig ( ) ;
32+ const sysConfig = flightLog . getSysConfig ( ) ;
3333 const logRateInfo = GraphSpectrumCalc . initialize ( flightLog , sysConfig ) ;
3434 GraphSpectrumPlot . initialize ( analyserCanvas , sysConfig ) ;
3535 GraphSpectrumPlot . setLogRateWarningInfo ( logRateInfo ) ;
36- let analyserZoomXElem = $ ( "#analyserZoomX" ) ;
37- let analyserZoomYElem = $ ( "#analyserZoomY" ) ;
36+ const analyserZoomXElem = $ ( "#analyserZoomX" ) ;
37+ const analyserZoomYElem = $ ( "#analyserZoomY" ) ;
3838 const analyserShiftPSDElem = $ ( "#analyserShiftPSD" ) ;
3939 const analyserLowLevelPSDElem = $ ( "#analyserLowLevelPSD" ) ;
4040
41- let spectrumToolbarElem = $ ( "#spectrumToolbar" ) ;
42- let spectrumTypeElem = $ ( "#spectrumTypeSelect" ) ;
43- let overdrawSpectrumTypeElem = $ ( "#overdrawSpectrumTypeSelect" ) ;
41+ const spectrumToolbarElem = $ ( "#spectrumToolbar" ) ;
42+ const spectrumTypeElem = $ ( "#spectrumTypeSelect" ) ;
43+ const overdrawSpectrumTypeElem = $ ( "#overdrawSpectrumTypeSelect" ) ;
4444
4545 this . setFullscreen = function ( size ) {
4646 isFullscreen = size == true ;
@@ -78,13 +78,13 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
7878 } ;
7979
8080 this . resize = function ( ) {
81- let newSize = getSize ( ) ;
81+ const newSize = getSize ( ) ;
8282
8383 // Determine the analyserCanvas location
8484 GraphSpectrumPlot . setSize ( newSize . width , newSize . height ) ;
8585
8686 // Recenter the analyser canvas in the bottom left corner
87- let parentElem = $ ( analyserCanvas ) . parent ( ) ;
87+ const parentElem = $ ( analyserCanvas ) . parent ( ) ;
8888
8989 $ ( parentElem ) . css ( {
9090 left : newSize . left , // (canvas.width * getSize().left) + "px",
@@ -302,7 +302,7 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
302302 GraphSpectrumPlot . setOverdraw ( userSettings . overdrawSpectrumType ) ;
303303
304304 overdrawSpectrumTypeElem . change ( function ( ) {
305- let optionSelected = parseInt ( overdrawSpectrumTypeElem . val ( ) , 10 ) ;
305+ const optionSelected = parseInt ( overdrawSpectrumTypeElem . val ( ) , 10 ) ;
306306
307307 if ( optionSelected != userSettings . overdrawSpectrumType ) {
308308 userSettings . overdrawSpectrumType = optionSelected ;
@@ -326,9 +326,9 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
326326 // Hide the combo and maximize buttons
327327 spectrumToolbarElem . removeClass ( "non-shift" ) ;
328328
329- let rect = analyserCanvas . getBoundingClientRect ( ) ;
330- let mouseX = e . clientX - rect . left ;
331- let mouseY = e . clientY - rect . top ;
329+ const rect = analyserCanvas . getBoundingClientRect ( ) ;
330+ const mouseX = e . clientX - rect . left ;
331+ const mouseY = e . clientY - rect . top ;
332332 if ( mouseX != lastMouseX || mouseY != lastMouseY ) {
333333 lastMouseX = mouseX ;
334334 lastMouseY = mouseY ;
0 commit comments