mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 15:18:12 +00:00
[Root] Root model provider sets location
Root model provider sets the location of roods so that the location capability does not need special handling for this.
This commit is contained in:
@ -42,8 +42,12 @@ define(
|
||||
* @constructor
|
||||
*/
|
||||
function RootModelProvider(roots, $q, $log) {
|
||||
// Pull out identifiers to used as ROOT's
|
||||
var ids = roots.map(function (root) { return root.id; }),
|
||||
// Pull out identifiers to used as ROOT's, while setting locations.
|
||||
var ids = roots.map(function (root) {
|
||||
if (!root.model) root.model = {};
|
||||
root.model.location = 'ROOT';
|
||||
return root.id;
|
||||
}),
|
||||
baseProvider = new StaticModelProvider(roots, $q, $log);
|
||||
|
||||
function addRoot(models) {
|
||||
@ -77,4 +81,4 @@ define(
|
||||
|
||||
return RootModelProvider;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
Reference in New Issue
Block a user