mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-23 08:15:19 +03:00
Added handing for selected LCs that are now disabled
This commit is contained in:
parent
b8485457dd
commit
daa70fc4b1
2 changed files with 15 additions and 2 deletions
13
js/gui.js
13
js/gui.js
|
@ -304,13 +304,22 @@ GUI_control.prototype.renderLogicConditionSelect = function ($container, logicCo
|
|||
|
||||
let $select = $container.append('<select class="mix-rule-condition">').find("select"),
|
||||
lcCount = logicConditions.getCount();
|
||||
option = "";
|
||||
|
||||
if (withAlways) {
|
||||
$select.append('<option value="-1">Always</option>')
|
||||
}
|
||||
for (let i = 0; i < lcCount ; i++) {
|
||||
if (!onlyEnabled || (logicConditions.isEnabled(i))) {
|
||||
$select.append('<option value="' + i + '">Logic Condition ' + i + ' </option>');
|
||||
if (!onlyEnabled || i === current || (logicConditions.isEnabled(i))) {
|
||||
option = '<option';
|
||||
|
||||
if (i === current && !logicConditions.isEnabled(i)) {
|
||||
option+= ' class="lc_disabled"';
|
||||
}
|
||||
|
||||
option+= ' value="' + i + '">Logic Condition ' + i + ' </option>';
|
||||
|
||||
$select.append(option);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue