mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 20:10:11 +03:00
Basic render of global function table
This commit is contained in:
parent
a15277ae25
commit
7478f6cd04
8 changed files with 256 additions and 35 deletions
|
@ -21,5 +21,27 @@ let GlobalFunctionsCollection = function () {
|
|||
return data.length
|
||||
};
|
||||
|
||||
self.init = function ($element) {
|
||||
|
||||
if (semver.lt(CONFIG.flightControllerVersion, "2.4.0")) {
|
||||
return;
|
||||
}
|
||||
|
||||
$container = $element;
|
||||
};
|
||||
|
||||
self.render = function () {
|
||||
let $table = $container.find(".function__table")
|
||||
$table.find("tbody tr").remove();
|
||||
|
||||
for (let k in self.get()) {
|
||||
if (self.get().hasOwnProperty(k)) {
|
||||
self.get()[k].render(k, $table);
|
||||
}
|
||||
}
|
||||
|
||||
GUI.switchery();
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue