From df79f7c9898d5fb07443e05962b93f69ad53793e Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Wed, 7 Jan 2015 17:32:20 +0000 Subject: [PATCH] Fix up selected vs is_selected. --- public_html/planeObject.js | 6 +++--- public_html/script.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 8af6f24..08b16f2 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -184,7 +184,7 @@ PlaneObject.prototype.updateIcon = function() { var col = MarkerColor; // If this marker is selected we should make it lighter than the rest. - if (this.is_selected) + if (this.selected) col = SelectedColor; // If we have not seen a recent update, change color @@ -196,7 +196,7 @@ PlaneObject.prototype.updateIcon = function() { if (this.squawk in SpecialSquawks) col = SpecialSquawks[this.squawk].markerColor; - var weight = this.is_selected ? 2 : 1; + var weight = this.selected ? 2 : 1; var rotation = (this.track === null ? 0 : this.track); if (col === this.icon.fillColor && weight === this.icon.strokeWeight && rotation === this.icon.rotation) @@ -310,7 +310,7 @@ PlaneObject.prototype.updateMarker = function(moved) { // Update our planes tail line, PlaneObject.prototype.updateLines = function() { - if (!this.is_selected) + if (!this.selected) return; for (var i = 0; i < this.track_linesegs.length; ++i) { diff --git a/public_html/script.js b/public_html/script.js index f0464ce..7399c6d 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -583,7 +583,7 @@ function selectPlaneByHex(hex) { //console.log("select: " + hex); // If SelectedPlane has something in it, clear out the selected if (SelectedPlane != null) { - Planes[SelectedPlane].is_selected = false; + Planes[SelectedPlane].selected = false; Planes[SelectedPlane].clearLines(); Planes[SelectedPlane].updateMarker(); $(Planes[SelectedPlane].tr).removeClass("selected"); @@ -597,7 +597,7 @@ function selectPlaneByHex(hex) { if (hex !== null) { // Assign the new selected SelectedPlane = hex; - Planes[SelectedPlane].is_selected = true; + Planes[SelectedPlane].selected = true; Planes[SelectedPlane].updateLines(); Planes[SelectedPlane].updateMarker(); $(Planes[SelectedPlane].tr).addClass("selected");