Auto merged - #2618 at Wed, 06 Oct 2021 12:17:10 GMT
Expert mode toggle bugfix and refactoring10.8-maintenance
commit
3feefcb184
|
@ -111,7 +111,7 @@ TuningSliders.initialize = function() {
|
|||
this.setDMinFeatureEnabled($('#dMinSwitch').is(':checked'));
|
||||
}
|
||||
|
||||
this.setExpertMode($('input[name="expertModeCheckbox"]').is(':checked'));
|
||||
this.setExpertMode(isExpertModeEnabled());
|
||||
|
||||
this.initPidSlidersPosition();
|
||||
this.initGyroFilterSliderPosition();
|
||||
|
@ -126,8 +126,8 @@ TuningSliders.initialize = function() {
|
|||
this.updateFilterSlidersDisplay();
|
||||
};
|
||||
|
||||
TuningSliders.setExpertMode = function() {
|
||||
this.expertMode = isExpertModeEnabled();
|
||||
TuningSliders.setExpertMode = function(expertModeEnabled) {
|
||||
this.expertMode = expertModeEnabled;
|
||||
|
||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
|
||||
document.getElementById('sliderDMaxGain').disabled = !this.expertMode;
|
||||
|
|
|
@ -515,8 +515,8 @@ function startProcess() {
|
|||
$(expertModeCheckbox).prop('checked', true);
|
||||
}
|
||||
|
||||
$(expertModeCheckbox).change(function () {
|
||||
const checked = $(this).is(':checked');
|
||||
$(expertModeCheckbox).on("change", () => {
|
||||
const checked = $(expertModeCheckbox).is(':checked');
|
||||
checkSetupAnalytics(function (analyticsService) {
|
||||
analyticsService.setDimension(analyticsService.DIMENSIONS.CONFIGURATOR_EXPERT_MODE, checked ? 'On' : 'Off');
|
||||
});
|
||||
|
@ -525,8 +525,12 @@ function startProcess() {
|
|||
updateTabList(FC.FEATURE_CONFIG.features);
|
||||
}
|
||||
|
||||
TuningSliders.setExpertMode(checked);
|
||||
}).change();
|
||||
if (GUI.active_tab) {
|
||||
TABS[GUI.active_tab]?.expertModeChanged?.(checked);
|
||||
}
|
||||
});
|
||||
|
||||
$(expertModeCheckbox).trigger("change");
|
||||
});
|
||||
|
||||
ConfigStorage.get('cliAutoComplete', function (result) {
|
||||
|
|
|
@ -2994,3 +2994,8 @@ TABS.pid_tuning.changeRatesTypeLogo = function() {
|
|||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
TABS.pid_tuning.expertModeChanged = function(expertModeEnabled) {
|
||||
TuningSliders.setExpertMode(expertModeEnabled);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue