1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 16:55:24 +03:00

Fix model preview in motors tab

This commit is contained in:
Bas Delfos 2017-07-29 12:19:25 +02:00
parent f30826877f
commit e5b777b86f
2 changed files with 9 additions and 3 deletions

View file

@ -177,7 +177,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
var reverse = "";
if (semver.lt(CONFIG.apiVersion, "1.36.0")) {
MIXER_CONFIG.reverseMotorDir ? "_reversed" : "";
reverse = MIXER_CONFIG.reverseMotorDir ? "_reversed" : "";
}
$('.mixerPreview img').attr('src', './resources/motor_order/' + mixerList[mixer - 1].image + reverse + '.svg');

View file

@ -167,8 +167,14 @@ TABS.motors.initialize = function (callback) {
lines.attr('d', graphHelpers.line);
}
function update_model(val) {
$('.mixerPreview img').attr('src', './resources/motor_order/' + mixerList[val - 1].image + '.svg');
function update_model(mixer) {
var reverse = "";
if (semver.lt(CONFIG.apiVersion, "1.36.0")) {
reverse = MIXER_CONFIG.reverseMotorDir ? "_reversed" : "";
}
$('.mixerPreview img').attr('src', './resources/motor_order/' + mixerList[mixer - 1].image + reverse + '.svg');
}
function process_html() {