mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-24 16:55:22 +03:00
Merge pull request #1954 from sensei-hacker/motor_direction_ui
mixer: Make props in / props out UI more clear
This commit is contained in:
commit
f443051ffa
4 changed files with 30 additions and 17 deletions
|
@ -61,6 +61,8 @@ var Settings = (function () {
|
|||
if (input.prop('tagName') == 'SELECT' || s.setting.table) {
|
||||
if (input.attr('type') == 'checkbox') {
|
||||
input.prop('checked', s.value > 0);
|
||||
} else if (input.attr('type') == 'radio') {
|
||||
input.prop( 'checked', s.value == input.attr('value') );
|
||||
} else {
|
||||
input.empty();
|
||||
let option = null;
|
||||
|
@ -515,6 +517,10 @@ var Settings = (function () {
|
|||
if (setting.table) {
|
||||
if (input.attr('type') == 'checkbox') {
|
||||
value = input.prop('checked') ? 1 : 0;
|
||||
} else if (input.attr('type') == 'radio') {
|
||||
if (input.prop('checked')) {
|
||||
value = parseInt(input.val());
|
||||
}
|
||||
} else {
|
||||
value = parseInt(input.val());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue