1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 00:05:22 +03:00

Add dmin note, remove spacer on wrap

This commit is contained in:
IvoFPV 2019-08-24 09:21:51 +02:00
parent 0c267265d4
commit 72b00c1d91
4 changed files with 32 additions and 3 deletions

View file

@ -332,6 +332,7 @@ TABS.pid_tuning.initialize = function (callback) {
$('.dtermLowpass2TypeGroup').hide();
$('.dminGroup').hide();
$('.dMinDisabledNote').hide();
//dmin column
$('#pid_main tr :nth-child(5)').hide();
@ -399,6 +400,7 @@ TABS.pid_tuning.initialize = function (callback) {
$('.pid_tuning input[name="dMinRoll"]').val(ADVANCED_TUNING.dMinRoll);
$('.pid_tuning input[name="dMinPitch"]').val(ADVANCED_TUNING.dMinPitch);
$('.pid_tuning input[name="dMinYaw"]').val(ADVANCED_TUNING.dMinYaw);
$('.dMinDisabledNote').hide();
$('.dminGroup .suboption').show();
$('#pid_main tr :nth-child(5)').show();
$('#pid_main .pid_titlebar2 th').attr('colspan', 6);
@ -409,6 +411,7 @@ TABS.pid_tuning.initialize = function (callback) {
$('.pid_tuning input[name="dMinPitch"]').val(0);
$('.pid_tuning input[name="dMinYaw"]').val(0);
$('.dminGroup .suboption').hide();
$('.dMinDisabledNote').show();
$('#pid_main tr :nth-child(5)').hide();
$('#pid_main .pid_titlebar2 th').attr('colspan', 5);
$('.helpicon[i18n_title="pidTuningPidTuningTipFeedforward"]').show();
@ -1420,6 +1423,20 @@ TABS.pid_tuning.initialize = function (callback) {
});
}
$(window).resize(function() {
let width = $(this).width();
if (width <= 1265) {
$('.pidControllerAdvancedSettings').removeClass('spacer_left');
} else if (width >= 1283) {
$('.pidControllerAdvancedSettings').addClass('spacer_left');
}
if (width <= 1405) {
$('.ratePreview').removeClass('spacer_left');
} else if (width >= 1423) {
$('.ratePreview').addClass('spacer_left');
}
});
// update == save.
$('a.update').click(function () {
form_to_pid_and_rc();