Skip to content

Commit

Permalink
Ensure the correct backend radio is selected when backend updates on …
Browse files Browse the repository at this point in the history
…launch.
  • Loading branch information
Mattk70 committed May 18, 2024
1 parent 40933d0 commit ee8f3cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,7 @@ window.onload = async () => {
showThreshold(config.detect.confidence);
SNRSlider.value = config.filters.SNR;
SNRThreshold.textContent = config.filters.SNR;
if (config.backend === 'webgl') {
if (config.backend === 'webgl' || config.backend === 'webgpu') {
SNRSlider.disabled = true;
};

Expand Down Expand Up @@ -2424,6 +2424,8 @@ function onChartData(args) {

const handleBackendChange = (backend) => {
config.backend = backend instanceof Event ? backend.target.value : backend;
const backendEL = document.getElementById(config.backend);
backendEL.checked = true;
if (config.backend === 'webgl' || config.backend === 'webgpu') {
//powerSave(true)
SNRSlider.disabled = true;
Expand Down

0 comments on commit ee8f3cc

Please sign in to comment.