Scanner enabled by right-click on the SQUELCH button.

This commit is contained in:
Marat Fayzullin 2023-05-10 20:05:12 -04:00
parent f69f19e9e0
commit 64f539c520
3 changed files with 9 additions and 10 deletions

View File

@ -1397,8 +1397,7 @@ img.openwebrx-mirror-img
100% { background: #00ff00; color: white; }
}
.openwebrx-scan-button {
color: #80ff80;
.openwebrx-squelch-auto {
animation-duration: 1s;
animation-iteration-count: infinite;
}

View File

@ -245,12 +245,6 @@
<input title="Waterfall maximum level" id="openwebrx-waterfall-color-max" class="openwebrx-panel-slider" type="range" min="-200" max="100" value="50" step="1" onchange="updateWaterfallColors(1);" oninput="updateVolume()">
</div>
</div>
<div class="openwebrx-section-divider" onclick="toggleSection(this);">&blacktriangledown;&nbsp;Scanner</div>
<div class="openwebrx-section">
<div class="openwebrx-panel-line">
<div class="openwebrx-button openwebrx-square-button openwebrx-scan-button" onclick="toggleScanner();" title="Scan bookmarks for signals">SCAN</div>
</div>
</div>
<div class="openwebrx-section-divider" onclick="toggleSection(this);">&blacktriangledown;&nbsp;Range</div>
<div class="openwebrx-section">
<div class="openwebrx-panel-line">

View File

@ -1584,6 +1584,12 @@ function initSliders() {
return false;
});
// Enable scanner by pressing the right mouse button on SQUELCH
$('.openwebrx-squelch-auto').on('contextmenu', function() {
toggleScanner();
return false;
});
}
function digimodes_init() {
@ -1712,12 +1718,12 @@ function toggleSpectrum() {
}
function stopScanner() {
$('.openwebrx-scan-button').css('animation-name', '');
$('.openwebrx-squelch-auto').css('animation-name', '');
scanner.stop();
}
function toggleScanner() {
var $scanButton = $('.openwebrx-scan-button');
var $scanButton = $('.openwebrx-squelch-auto');
var on = scanner.toggle();
$scanButton.css('animation-name', on? 'openwebrx-scan-animation' : '');