mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-19 06:15:11 +03:00
Fixed and enhanced LC display
This commit is contained in:
parent
386c23f8a4
commit
b8485457dd
6 changed files with 12 additions and 5 deletions
|
@ -300,7 +300,7 @@ GUI_control.prototype.renderOperandValue = function ($container, operandMetadata
|
|||
* @param {function} onChange
|
||||
* @param {boolean} withAlways
|
||||
*/
|
||||
GUI_control.prototype.renderLogicConditionSelect = function ($container, logicConditions, current, onChange, withAlways) {
|
||||
GUI_control.prototype.renderLogicConditionSelect = function ($container, logicConditions, current, onChange, withAlways, onlyEnabled) {
|
||||
|
||||
let $select = $container.append('<select class="mix-rule-condition">').find("select"),
|
||||
lcCount = logicConditions.getCount();
|
||||
|
@ -309,7 +309,9 @@ GUI_control.prototype.renderLogicConditionSelect = function ($container, logicCo
|
|||
$select.append('<option value="-1">Always</option>')
|
||||
}
|
||||
for (let i = 0; i < lcCount ; i++) {
|
||||
$select.append('<option value="' + i + '">Logic Condition ' + i + ' </option>');
|
||||
if (!onlyEnabled || (logicConditions.isEnabled(i))) {
|
||||
$select.append('<option value="' + i + '">Logic Condition ' + i + ' </option>');
|
||||
}
|
||||
}
|
||||
|
||||
$select.val(current).change(onChange);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue