Merging further changes.

This commit is contained in:
Marat Fayzullin 2023-09-10 13:09:11 -04:00 committed by Marat Fayzullin
parent e1ea573ce3
commit 1ab77f4106
3 changed files with 19 additions and 12 deletions

View File

@ -85,9 +85,13 @@ Envelope.prototype.draw = function(visible_range){
scale_ctx.font = "bold 11px sans-serif";
scale_ctx.textBaseline = "top";
scale_ctx.textAlign = "left";
scale_ctx.fillText(this.demodulator.high_cut.toString(), to_px + env_att_w, env_h2);
if (typeof(this.demodulator.high_cut) === 'number') {
scale_ctx.fillText(this.demodulator.high_cut.toString(), to_px + env_att_w, env_h2);
}
scale_ctx.textAlign = "right";
scale_ctx.fillText(this.demodulator.low_cut.toString(), from_px - env_att_w, env_h2);
if (typeof(this.demodulator.low_cut) === 'number') {
scale_ctx.fillText(this.demodulator.low_cut.toString(), from_px - env_att_w, env_h2);
}
}
if (typeof line !== "undefined") // out of screen?
{

View File

@ -164,15 +164,16 @@ DemodulatorPanel.prototype.updatePanels = function() {
$('#openwebrx-panel-digimodes').attr('data-mode', modulation);
var mode = Modes.findByModulation(modulation);
toggle_panel("openwebrx-panel-digimodes", modulation && (!mode || mode.secondaryFft));
toggle_panel("openwebrx-panel-wsjt-message", ["ft8", "wspr", "jt65", "jt9", "ft4", "fst4", "fst4w", "q65", "msk144"].indexOf(modulation) >= 0);
toggle_panel("openwebrx-panel-js8-message", modulation == "js8");
toggle_panel("openwebrx-panel-packet-message", ["packet", "ais"].indexOf(modulation) >= 0);
toggle_panel("openwebrx-panel-pocsag-message", modulation === "pocsag");
toggle_panel("openwebrx-panel-page-message", modulation === "page");
toggle_panel("openwebrx-panel-hfdl-message", ["hfdl", "vdl2", "adsb", "acars"].indexOf(modulation) >= 0);
toggle_panel("openwebrx-panel-sstv-message", modulation === "sstv");
toggle_panel("openwebrx-panel-fax-message", modulation === "fax");
toggle_panel("openwebrx-panel-ism-message", modulation === "ism");
// WSJT-X modes share the same panel
toggle_panel("openwebrx-panel-wsjt-message", ['ft8', 'wspr', 'jt65', 'jt9', 'ft4', 'fst4', 'fst4w', "q65", "msk144"].indexOf(modulation) >= 0);
// Aeronautic modes share the same panel
toggle_panel("openwebrx-panel-hfdl-message", ['hfdl', 'vdl2', 'adsb', 'acars'].indexOf(modulation) >= 0);
// Packet modes share the same panel
toggle_panel("openwebrx-panel-packet-message", ['packet', 'ais'].indexOf(modulation) >= 0);
// these modes come with their own
['js8', 'page', 'pocsag', 'sstv', 'fax', 'ism'].forEach(function(m) {
toggle_panel('openwebrx-panel-' + m + '-message', modulation === m);
});
modulation = this.getDemodulator().get_modulation();
var showing = 'openwebrx-panel-metadata-' + modulation;

View File

@ -122,7 +122,9 @@ TuneableFrequencyDisplay.prototype.setupEvents = function() {
});
$inputs.on('blur', function(e){
if (!me.input.is(':visible')) return;
if ($inputs.toArray().indexOf(e.relatedTarget) >= 0) return;
if ($inputs.toArray().indexOf(e.relatedTarget) >= 0) {
return;
}
submit();
});
me.input.on('keydown', function(e){