Skip to content

Commit

Permalink
fix web interface issue with sACN toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
jackw01 committed Aug 31, 2021
1 parent e407865 commit a5a67ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ledcontrol/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ function handleInputChange(elem) {

// On sACN mode change, hide or show UI
if (key === 'sacn') {
console.log(val);
const elems = $('.input-toplevel:not(.input-toplevel[data-id=brightness], .input-toplevel[data-id=color_temp], .input-toplevel[data-id=sacn]), #code, #palette-color-bar, #colors');
if (val === 1) elems.hide();
else elems.show();
Expand Down Expand Up @@ -347,6 +346,8 @@ window.onload = function() {
$('#delete-palette').on('click', handleDeletePalette);
$('#palette-name').on('change', handleRenamePalette);

handleInputChange($('select[data-id="sacn"]'));

$.getJSON('/getpatternsources', {}, (result) => {
console.log('Sources:', result);
// Set selected pattern to correct value
Expand Down

0 comments on commit a5a67ee

Please sign in to comment.