Added option to turn map colors off.

This commit is contained in:
Marat Fayzullin 2023-03-30 22:42:08 -04:00
parent ea95721c88
commit 3ad2d22f96
2 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@
<select id="openwebrx-map-colormode">
<option value="byband" selected="selected">By Band</option>
<option value="bymode">By Mode</option>
<option value="off">Off</option>
</select>
<div class="content"></div>
</div>

View File

@ -43,7 +43,7 @@ $(function(){
var colorKeys = {};
var colorScale = chroma.scale(['red', 'blue', 'green']).mode('hsl');
var getColor = function(id){
if (!id) return "#000000";
if (!id) return "#ffffff10";
if (!colorKeys[id]) {
var keys = Object.keys(colorKeys);
keys.push(id);
@ -82,6 +82,8 @@ $(function(){
return r.band;
case 'bymode':
return r.mode;
case 'off':
return '';
}
};