mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 09:45:28 +03:00
Order OSD elements in alphabetical order
This commit is contained in:
parent
5694ac62a8
commit
db6651e560
1 changed files with 13 additions and 1 deletions
|
@ -2275,7 +2275,19 @@ TABS.osd.initialize = function (callback) {
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$displayFields.append($field);
|
|
||||||
|
// Insert in alphabetical order
|
||||||
|
let added = false;
|
||||||
|
$displayFields.children().each(function() {
|
||||||
|
if ($(this).text() > $field.text()) {
|
||||||
|
$(this).before($field);
|
||||||
|
added = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if(!added) {
|
||||||
|
$displayFields.append($field);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GUI.switchery();
|
GUI.switchery();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue