improved legend with opacity

This commit is contained in:
Jakob Ketterl 2019-07-28 16:33:19 +02:00
parent 785d439605
commit 3b5883dd55
2 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,8 @@ ul {
width: 30px;
height: 20px;
margin-right: 10px;
border-width: 2px;
border-style: solid;
}
.openwebrx-map-legend select {

View File

@ -82,7 +82,7 @@
var updateLegend = function() {
var lis = $.map(colorKeys, function(value, key) {
return '<li class="square"><span class="illustration" style="background-color:' + value + ';"></span>' + key + '</li>';
return '<li class="square"><span class="illustration" style="background-color:' + chroma(value).alpha(fillOpacity) + ';border-color:' + chroma(value).alpha(strokeOpacity) + ';"></span>' + key + '</li>';
});
$(".openwebrx-map-legend .content").html('<ul>' + lis.join('') + '</ul>');
}