This commit is contained in:
jwt27 2023-02-18 18:12:17 +01:00 committed by GitHub
commit 3f0d93333f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -585,7 +585,9 @@ function canvas_mouseup(evt) {
var relativeX = get_relative_x(evt);
if (!canvas_drag) {
$('#openwebrx-panel-receiver').demodulatorPanel().getDemodulator().set_offset_frequency(canvas_get_freq_offset(relativeX));
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 {
canvas_end_drag();