1
0
Fork 0
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:
Paweł Spychalski 2024-02-02 14:21:23 +01:00 committed by GitHub
commit f443051ffa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 30 additions and 17 deletions

View file

@ -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());
}