[API] Update ViewRegistry to match docs

This commit is contained in:
Victor Woeltjen 2016-09-29 17:34:41 -07:00
parent 91214f2623
commit 3f20c1bb94
2 changed files with 13 additions and 26 deletions

View File

@ -1,26 +0,0 @@
define([], function () {
/**
* A ViewRegistry maintains the definitions for different kinds of views
* that may occur in different places in the user interface.
* @interface ViewRegistry
* @memberof module:openmct
*/
function ViewRegistry() {
}
/**
* Register a new type of view.
*
* @param {module:openmct.ViewProvider} provider the provider for this view
* @method addProvider
* @memberof module:openmct.ViewRegistry#
*/
ViewRegistry.prototype.addProvider = function (provider) {
};
return ViewRegistry;
});

View File

@ -1,4 +1,10 @@
define([], function () {
/**
* A ViewRegistry maintains the definitions for different kinds of views
* that may occur in different places in the user interface.
* @interface ViewRegistry
* @memberof module:openmct
*/
function ViewRegistry() {
this.providers = [];
}
@ -9,6 +15,13 @@ define([], function () {
});
};
/**
* Register a new type of view.
*
* @param {module:openmct.ViewProvider} provider the provider for this view
* @method addProvider
* @memberof module:openmct.ViewRegistry#
*/
ViewRegistry.prototype.addProvider = function (provider) {
this.providers.push(provider);
};