mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 21:58:13 +00:00
tutorial consistency . (#1079)
* [API] use new-style objects consistently * rewrite todo tutorial in test-api.html * [API] Add API doc, update object API * [Tutorials] Rename tutorials, remove old * Fix Links * updates * initial * hope this works * Object Utils always return new objects instead of mutating existing objects * keep domain object model in-sync when listening Keep the domain object model in sync with the latest version when listening for mutation events. * Remove old-style plugins * Update views to use new API * Tidy Code * Update API Docs * Add Plugin API and Example
This commit is contained in:
@ -1,44 +0,0 @@
|
||||
define(function () {
|
||||
return function grootPlugin(mct) {
|
||||
var ROOT_KEY = {
|
||||
namespace: 'groot',
|
||||
identifier: 'groot'
|
||||
};
|
||||
|
||||
var GROOT_ROOT = {
|
||||
name: 'I am groot',
|
||||
type: 'folder',
|
||||
composition: [
|
||||
{
|
||||
namespace: 'groot',
|
||||
identifier: 'arms'
|
||||
},
|
||||
{
|
||||
namespace: 'groot',
|
||||
identifier: 'legs'
|
||||
},
|
||||
{
|
||||
namespace: 'groot',
|
||||
identifier: 'torso'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var GrootProvider = {
|
||||
get: function (key) {
|
||||
if (key.identifier === 'groot') {
|
||||
return Promise.resolve(GROOT_ROOT);
|
||||
}
|
||||
return Promise.resolve({
|
||||
name: 'Groot\'s ' + key.identifier
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
mct.Objects.addRoot(ROOT_KEY);
|
||||
|
||||
mct.Objects.addProvider('groot', GrootProvider);
|
||||
|
||||
return mct;
|
||||
};
|
||||
});
|
Reference in New Issue
Block a user