display current waterfall values on mouse over

This commit is contained in:
Jakob Ketterl 2020-09-13 13:57:12 +02:00
parent 39a473c8c2
commit 0e8aece991

View File

@ -87,31 +87,37 @@ function updateWaterfallColors(which) {
waterfall_min_level = parseInt($wfmin.val());
if (waterfall_min_level >= waterfall_max_level) {
if (!which) {
$wfmin.val(waterfall_max_level - 1);
waterfall_min_level = waterfall_max_level -1;
} else {
$wfmax.val(waterfall_min_level + 1);
waterfall_max_level = waterfall_min_level + 1;
}
}
updateWaterfallSliders();
}
function updateWaterfallSliders() {
$('#openwebrx-waterfall-color-max')
.val(waterfall_max_level)
.attr('title', 'Waterfall maximum level (' + Math.round(waterfall_max_level) + ' dB)');
$('#openwebrx-waterfall-color-min')
.val(waterfall_min_level)
.attr('title', 'Waterfall minimum level (' + Math.round(waterfall_min_level) + ' dB)');
}
function waterfallColorsDefault() {
waterfall_min_level = waterfall_min_level_default;
waterfall_max_level = waterfall_max_level_default;
$("#openwebrx-waterfall-color-min").val(waterfall_min_level);
$("#openwebrx-waterfall-color-max").val(waterfall_max_level);
updateWaterfallSliders();
waterfallColorsContinuousReset();
}
function waterfallColorsAuto(levels) {
var min_level = levels.min - waterfall_auto_level_margin.min;
$("#openwebrx-waterfall-color-min").val(min_level);
var max_level = levels.max + waterfall_auto_level_margin.max;
max_level = Math.max(min_level + (waterfall_auto_level_margin.min_range || 0), max_level);
$("#openwebrx-waterfall-color-max").val(max_level);
waterfall_min_level = min_level;
waterfall_max_level = max_level;
updateWaterfallSliders();
}
var waterfall_continuous = {