Fixing scroll wheel operation.
This commit is contained in:
parent
c5aea8e284
commit
f3c8a5875d
@ -249,12 +249,7 @@ Demodulator.prototype.set_offset_frequency = function(to_what) {
|
|||||||
if (this.offset_frequency === to_what) {
|
if (this.offset_frequency === to_what) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.get_modulation() === 'cw') {
|
this.offset_frequency = to_what;
|
||||||
// For CW, move offset 800Hz below the actual carrier
|
|
||||||
this.offset_frequency = to_what - 800;
|
|
||||||
} else {
|
|
||||||
this.offset_frequency = to_what;
|
|
||||||
}
|
|
||||||
this.set();
|
this.set();
|
||||||
this.emit("frequencychange", to_what);
|
this.emit("frequencychange", to_what);
|
||||||
mkenvelopes(get_visible_freq_range());
|
mkenvelopes(get_visible_freq_range());
|
||||||
|
@ -658,7 +658,13 @@ 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(canvas_get_freq_offset(relativeX));
|
var demodulator = $('#openwebrx-panel-receiver').demodulatorPanel().getDemodulator();
|
||||||
|
var f = canvas_get_freq_offset(relativeX);
|
||||||
|
// For CW, move offset 800Hz below the actual carrier
|
||||||
|
if (demodulator.get_modulation() === 'cw') {
|
||||||
|
f = f - 800;
|
||||||
|
}
|
||||||
|
demodulator.set_offset_frequency(f);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
canvas_end_drag();
|
canvas_end_drag();
|
||||||
|
Loading…
Reference in New Issue
Block a user