mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-04-04 14:08:38 +00:00
make a more generic ExponentialInput and use that for the sample_rate input
This commit is contained in:
parent
7a0c934af5
commit
0537e23e38
5 changed files with 22 additions and 19 deletions
|
|
@ -1,4 +1,4 @@
|
|||
$.fn.frequencyInput = function() {
|
||||
$.fn.exponentialInput = function() {
|
||||
var suffixes = {
|
||||
"K": 3,
|
||||
"M": 6,
|
||||
|
|
@ -9,7 +9,7 @@ $.fn.frequencyInput = function() {
|
|||
this.each(function(){
|
||||
var $group = $(this);
|
||||
var currentExponent = 0;
|
||||
$input = $group.find('input');
|
||||
var $input = $group.find('input');
|
||||
|
||||
var setExponent = function() {
|
||||
var newExponent = parseInt($exponent.val());
|
||||
|
|
@ -26,7 +26,7 @@ $.fn.frequencyInput = function() {
|
|||
}
|
||||
});
|
||||
|
||||
$exponent = $group.find('select.frequency-exponent');
|
||||
var $exponent = $group.find('select.exponent');
|
||||
$exponent.on('change', setExponent);
|
||||
|
||||
// calculate initial exponent
|
||||
Loading…
Add table
Add a link
Reference in a new issue