Added colored band/mode designators to locator info windows.

This commit is contained in:
Marat Fayzullin 2023-10-16 22:02:05 -04:00
parent 7b9f8026d2
commit c09387e3c9
1 changed files with 5 additions and 2 deletions

View File

@ -286,11 +286,14 @@ Locator.prototype.getInfoHTML = function(locator, pos, receiverMarker = null) {
var odd = false;
var list = inLocator.map(function(x) {
var mc = self.colorMode === 'mode'? chroma(self.colorKeys[x.mode]).alpha(0.5) : 'inherit';
var bc = self.colorMode === 'band'? chroma(self.colorKeys[x.band]).alpha(0.5) : 'inherit';
var row = '<tr style="background-color:' + (odd? '#E0FFE0':'#FFFFFF')
+ ';"><td>' + Utils.linkifyCallsign(x.callsign) + '</td>'
+ '<td>' + moment(x.lastseen).fromNow() + '</td>'
+ '<td>' + x.mode + '</td>'
+ '<td>' + x.band + '</td>'
+ '<td style="background-color:' + mc + ';">' + x.mode + '</td>'
+ '<td style="background-color:' + bc + ';">' + x.band + '</td>'
+ '</tr>';
odd = !odd;