diff --git a/public_html/images/hide_sidebar_active_48x40.png b/public_html/images/hide_sidebar_active_48x40.png
new file mode 100644
index 0000000..d0335ea
Binary files /dev/null and b/public_html/images/hide_sidebar_active_48x40.png differ
diff --git a/public_html/images/hide_sidebar_inactive_48x40.png b/public_html/images/hide_sidebar_inactive_48x40.png
new file mode 100644
index 0000000..81e3972
Binary files /dev/null and b/public_html/images/hide_sidebar_inactive_48x40.png differ
diff --git a/public_html/images/show_sidebar_active_48x40.png b/public_html/images/show_sidebar_active_48x40.png
new file mode 100644
index 0000000..3396092
Binary files /dev/null and b/public_html/images/show_sidebar_active_48x40.png differ
diff --git a/public_html/images/show_sidebar_inactive_48x40.png b/public_html/images/show_sidebar_inactive_48x40.png
new file mode 100644
index 0000000..25aa7d2
Binary files /dev/null and b/public_html/images/show_sidebar_inactive_48x40.png differ
diff --git a/public_html/index.html b/public_html/index.html
index 6862bc1..c4844de 100644
--- a/public_html/index.html
+++ b/public_html/index.html
@@ -44,147 +44,150 @@
-
-
-
+
+
+
+
+ FlightAware dump1090
+ |
+
+
+ |
+
+
+
+ |
+ |
+
+
+
+ (no aircraft selected) |
+ |
+
+
+
+ |
+ |
+
+
+
+ Aircraft (total): n/a |
+ Messages: n/a/sec |
+
+
+
+ (with positions): n/a |
+ History: n/a positions |
+
+
+
+
+
+
+
+
+
+ n/a
+
+ ⇒
+
+
+
+
+
+
+
+
+
+
+
+ [FlightAware]
+ |
+
+
+
+ Country of registration: n/a |
+
+
+
+ Altitude: |
+ Squawk: |
+
+
+
+ Speed: n/a |
+ RSSI: |
+
+
+
+ Track: n/a |
+ Last seen: n/a |
+
+
+
+ Position: n/a |
+
+
+
+ Distance from Site: n/a |
+
+
+
+
+
+
+
+
+ ICAO |
+ |
+ Flight |
+ Squawk |
+ Altitude |
+ Speed |
+ Distance |
+ Track |
+ Msgs |
+ Age |
+
+
+
+
+ ICAO |
+ |
+ FLIGHT |
+ SQUAWK |
+ ALTITUDE |
+ SPEED |
+ DISTANCE |
+ TRACK |
+ MSGS |
+ SEEN |
+
+
+
+
+
+
+
+
Squawk 7x00 is reported and shown.
diff --git a/public_html/script.js b/public_html/script.js
index 1f28cab..e680f12 100644
--- a/public_html/script.js
+++ b/public_html/script.js
@@ -197,6 +197,19 @@ function initialize() {
$("#loader").removeClass("hidden");
+ // Set up map/sidebar splitter
+ $("#sidebar_container").resizable({handles: {w: '#splitter'}});
+
+ // Set up event handler for expand/collapse sidebar button
+ $("#toggle_sidebar_button").click(toggleSidebarVisibility);
+
+ // Force map to redraw if sidebar container is resized - use a timer to debounce
+ var mapResizeTimeout;
+ $("#sidebar_container").on("resize", function() {
+ clearTimeout(mapResizeTimeout);
+ mapResizeTimeout = setTimeout(updateMapSize, 50);
+ });
+
// Get receiver metadata, reconfigure using it, then continue
// with initialization
$.ajax({ url: 'data/receiver.json',
@@ -929,3 +942,15 @@ function resetMap() {
selectPlaneByHex(null,false);
}
+
+function updateMapSize() {
+ OLMap.updateSize();
+}
+
+function toggleSidebarVisibility(e) {
+ e.preventDefault();
+ $("#sidebar_container").toggle();
+ $("#toggle_sidebar_button").toggleClass("show_sidebar");
+ $("#toggle_sidebar_button").toggleClass("hide_sidebar");
+ updateMapSize();
+}
diff --git a/public_html/style.css b/public_html/style.css
index ff8868c..b8791f2 100644
--- a/public_html/style.css
+++ b/public_html/style.css
@@ -2,10 +2,65 @@ html, body {
margin: 0; padding: 0; background-color: #ffffff; font-family: Tahoma, Sans-Serif;
font-size: 10pt; overflow: auto; height: 100%;
}
-div#map_container { float: left; width: 100%; height: 100%; }
-div#map_canvas { height: 100%; margin-right: 420px; }
-div#sidebar_container { float: left; width: 410px; margin-left: -410px; height: 100%; overflow: auto; }
+#layout_container {
+ display: flex;
+ height: 100%;
+}
+
+#map_container {
+ flex: 1 1 auto;
+ position: relative;
+ height: 100%;
+}
+
+#map_canvas {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+}
+
+#toggle_sidebar_button {
+ width: 48px;
+ height: 40px;
+ position: absolute;
+ top: 6px;
+ right: 6px;
+}
+
+#toggle_sidebar_button.show_sidebar {
+ background-image: url("images/show_sidebar_inactive_48x40.png")
+}
+
+#toggle_sidebar_button.show_sidebar:hover {
+ background-image: url("images/show_sidebar_active_48x40.png")
+}
+
+#toggle_sidebar_button.hide_sidebar {
+ background-image: url("images/hide_sidebar_inactive_48x40.png")
+}
+
+#toggle_sidebar_button.hide_sidebar:hover {
+ background-image: url("images/hide_sidebar_active_48x40.png")
+}
+
+#sidebar_container {
+ display: flex;
+ width: 410px;
+ padding-left: 10px;
+ left: 0 !important;
+}
+
+#splitter {
+ flex: 0 0 6px;
+ cursor: col-resize;
+ background-color: #bbbbbb;
+ left: 0 !important;
+}
+
+#sidebar_canvas {
+ flex: 1 1 auto;
+}
div#SpecialSquawkWarning { position: absolute; bottom: 25px; right: 430px; border: 2px solid red;
background-color: #FFFFA3; opacity: 0.75; filter:alpha(opacity=75); padding: 5px;