improved legend with opacity
This commit is contained in:
parent
785d439605
commit
3b5883dd55
@ -46,6 +46,8 @@ ul {
|
|||||||
width: 30px;
|
width: 30px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
border-width: 2px;
|
||||||
|
border-style: solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openwebrx-map-legend select {
|
.openwebrx-map-legend select {
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
var updateLegend = function() {
|
var updateLegend = function() {
|
||||||
var lis = $.map(colorKeys, function(value, key) {
|
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>');
|
$(".openwebrx-map-legend .content").html('<ul>' + lis.join('') + '</ul>');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user