Turn on strict mode, fix a few errors.

This commit is contained in:
Oliver Jowett 2015-01-07 17:35:32 +00:00
parent df79f7c989
commit 139ed5cb36
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,5 @@
"use strict";
var PlaneSvg = "M 0,0 " +
"M 1.9565564,41.694305 C 1.7174505,40.497708 1.6419973,38.448747 " +
"1.8096508,37.70494 1.8936398,37.332056 2.0796653,36.88191 2.222907,36.70461 " +

View file

@ -1,3 +1,5 @@
"use strict";
// Define our global variables
var GoogleMap = null;
var Planes = {};
@ -21,7 +23,10 @@ var RefreshInterval = 1000;
var PlaneRowTemplate = null;
var TrackedAircraft = 0;
var TrackedPositions = 0;
var TrackedAircraftPositions = 0;
var TrackedHistorySize = 0;
var SitePosition = null;
function fetchData() {
$.getJSON('data/aircraft.json', function(data) {
@ -545,9 +550,9 @@ function sortByTrack() { sortBy('track', function(x,y){return compareNumeri
function sortByMsgs() { sortBy('msgs', function(x,y){return compareNumeric(x.msgs, x.sort_pos, y.msgs, y.sort_pos)}); }
function sortBySeen() { sortBy('seen', function(x,y){return compareNumeric(x.seen, x.sort_pos, y.seen, y.sort_pos)}); }
sortId = '';
sortByFunc = null;
sortAscending = true;
var sortId = '';
var sortByFunc = null;
var sortAscending = true;
function resortTable() {
// make it a stable sort