round to absolute frequency when clicking waterfall, not relative to center_freq
This commit is contained in:
parent
5a45ff3171
commit
0d071f1a06
@ -545,7 +545,9 @@ function canvas_mouseup(evt) {
|
|||||||
var relativeX = get_relative_x(evt);
|
var relativeX = get_relative_x(evt);
|
||||||
|
|
||||||
if (!canvas_drag) {
|
if (!canvas_drag) {
|
||||||
$('#openwebrx-panel-receiver').demodulatorPanel().getDemodulator().set_offset_frequency(Math.round(canvas_get_freq_offset(relativeX)/100)*100);
|
var step = 100;
|
||||||
|
var freq = Math.round((canvas_get_frequency(relativeX)) / step) * step - center_freq;
|
||||||
|
$('#openwebrx-panel-receiver').demodulatorPanel().getDemodulator().set_offset_frequency(freq);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
canvas_end_drag();
|
canvas_end_drag();
|
||||||
|
Loading…
Reference in New Issue
Block a user