mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-04-20 22:05:13 +00:00
refactor frequency display
This commit is contained in:
parent
470fc43646
commit
ae98e6bc56
3 changed files with 19 additions and 6 deletions
7
htdocs/lib/FrequencyDisplay.js
Normal file
7
htdocs/lib/FrequencyDisplay.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
function FrequencyDisplay(element) {
|
||||
this.element = $(element);
|
||||
}
|
||||
|
||||
FrequencyDisplay.prototype.setFrequency = function(freq) {
|
||||
this.element.html((freq / 1e6).toLocaleString(undefined, {maximumFractionDigits: 4, minimumFractionDigits: 3}) + " MHz");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue