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

Merge pull request #402 from mikeller/reorder_mixer_list

Reordered mixer list for better useability.
This commit is contained in:
Michael Keller 2017-01-29 23:47:43 +13:00 committed by GitHub
commit cc58529045
2 changed files with 33 additions and 30 deletions

View file

@ -143,8 +143,12 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
function process_html() {
var mixer_list_e = $('select.mixerList');
for (var i = 0; i < mixerList.length; i++) {
mixer_list_e.append('<option value="' + (i + 1) + '">' + mixerList[i].name + '</option>');
for (var selectIndex = 0; selectIndex < mixerList.length; selectIndex++) {
mixerList.forEach(function (mixerEntry, mixerIndex) {
if (mixerEntry.pos === selectIndex) {
mixer_list_e.append('<option value="' + (mixerIndex + 1) + '">' + mixerEntry.name + '</option>');
}
});
}
mixer_list_e.change(function () {