1
0
Fork 0
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:
Pawel Spychalski (DzikuVx) 2020-04-10 11:37:52 +02:00
parent a15277ae25
commit 7478f6cd04
8 changed files with 256 additions and 35 deletions

View file

@ -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;
}