Skip to content

Commit

Permalink
allow labels to show without high zoom (new button)
Browse files Browse the repository at this point in the history
  • Loading branch information
alkissack committed Sep 26, 2023
1 parent 05e9646 commit 9ee22fd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions public_html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@
<td colspan="3">
<div id="sudo_buttons">
<span class="sidebarButton pointer" onclick="resetMap();">Reset Map</span>
<span class="sidebarButton pointer" onclick="showLabels();">Show Labels</span>
<span class="sidebarButton pointer" onclick="selectAllPlanes();">Select All</span>
<span class="sidebarButton pointer" onclick="selectMilPlanes();">Select
Specials</span> <!-- AKISSACK Ref: AK9G -->
<span class="sidebarButton pointer" onclick="selectMilPlanes();">Select Specials</span> <!-- AKISSACK Ref: AK9G -->
<span class="sidebarButton pointer" onclick="deselectAllPlanes();">DeSelect</span>
</div>
</td>
Expand Down
3 changes: 2 additions & 1 deletion public_html/planeObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -837,13 +837,14 @@ PlaneObject.prototype.updateMarker = function (moved) {
// ---------------------------------------------------------------------
// AKISSACK - PERMANENT LABEL PART 2 - Update ---------------- ref: AK7A
// ---------------------------------------------------------------------
//console.log("ASPL " + AllwaysShowPermanentLabels );
if (ShowPermanentLabels) {
// Update label as as well as moving we may have gone up or down
var v = ""; // An indication of level, climbing or decending
var labelText = "";
this.labelColour = "#ffffff";

if (ZoomLvl > 10) {
if (ZoomLvl > 10 || AllwaysShowPermanentLabels ) {
if (this.vert_rate > 256) {
v = UP_TRIANGLE;
} else {
Expand Down
6 changes: 6 additions & 0 deletions public_html/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var SelectedPlane = null;
var SelectedAllPlanes = false;
var FollowSelected = false;
var IsDarkMap = false;
var AllwaysShowPermanentLabels = false;
// --------------------------------------------------------------------------------------
// AKISSACK - Variables -----------------------------------------------------------------
// --------------------------------------------------------------------------------------
Expand Down Expand Up @@ -2704,6 +2705,7 @@ function deselectAllPlanes() {
}
SelectedPlane = null;
SelectedAllPlanes = false;
AllwaysShowPermanentLabels = false;
deselectMilPlanes();
refreshSelected();
}
Expand Down Expand Up @@ -3270,3 +3272,7 @@ function convert_nm_distance(dist, displayUnits) {
return (dist); // nautical miles
}

function showLabels() {
AllwaysShowPermanentLabels = true;
//console.log("ASPL " + AllwaysShowPermanentLabels );
}

0 comments on commit 9ee22fd

Please sign in to comment.