mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-01-20 23:50:17 +01:00
add arrow to toggle legend pane
This commit is contained in:
parent
900fbafaa4
commit
dc390aa8b7
|
|
@ -30,6 +30,24 @@ ul {
|
|||
user-select: none;
|
||||
}
|
||||
|
||||
.openwebrx-arrow-up {
|
||||
margin-top: 5px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-bottom: 10px solid black;
|
||||
}
|
||||
|
||||
.openwebrx-arrow-down {
|
||||
margin-top: 5px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 10px solid black;
|
||||
}
|
||||
|
||||
/* show it as soon as google maps has moved it to its container */
|
||||
.openwebrx-map .openwebrx-map-legend {
|
||||
display: block;
|
||||
|
|
|
|||
|
|
@ -28,16 +28,21 @@ function MapManager() {
|
|||
}, 1000);
|
||||
|
||||
// When stuff loads...
|
||||
$(function() {
|
||||
$(function () {
|
||||
// Create clock display
|
||||
self.clock = new Clock($('#openwebrx-clock-utc'));
|
||||
|
||||
// Clicking clock display toggles legend box on/off
|
||||
$('#openwebrx-clock-utc').css('cursor', 'pointer').on('click', function() {
|
||||
$('#openwebrx-legend-toggle').css({
|
||||
'cursor': 'pointer',
|
||||
'display': 'flex',
|
||||
'justify-content': 'space-between'
|
||||
}).on('click', function () {
|
||||
var el = document.getElementById('openwebrx-map-selectors');
|
||||
if (el) {
|
||||
el.style.display = el.style.display === 'none'?
|
||||
'block' : 'none';
|
||||
$(this).find('i').removeClass()
|
||||
.addClass('openwebrx-arrow-' + (el.style.display === 'none' ? 'down' : 'up'));
|
||||
el.style.display = el.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@
|
|||
<ul class="features">
|
||||
</ul>
|
||||
</div>
|
||||
<h3 id="openwebrx-clock-utc" style="margin: 20px 0 0 0;">00:00 UTC</h3>
|
||||
<div id='openwebrx-legend-toggle'>
|
||||
<i class="openwebrx-arrow-down"></i>
|
||||
<h3 id="openwebrx-clock-utc" style="margin: 0;">00:00 UTC</h3>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@
|
|||
<ul class="features">
|
||||
</ul>
|
||||
</div>
|
||||
<h3 id="openwebrx-clock-utc" style="margin: 20px 0 0 0;">00:00 UTC</h3>
|
||||
<div id='openwebrx-legend-toggle'>
|
||||
<i class="openwebrx-arrow-down"></i>
|
||||
<h3 id="openwebrx-clock-utc" style="margin: 0;">00:00 UTC</h3>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in a new issue