mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 21:27:52 +00:00
[API] Move view off of type
This commit is contained in:
parent
21a618d1ce
commit
d891affe48
@ -15,6 +15,10 @@ define([
|
||||
});
|
||||
MCT.prototype.MCT = MCT;
|
||||
|
||||
MCT.prototype.view = function (region, factory) {
|
||||
|
||||
};
|
||||
|
||||
MCT.prototype.type = function (key, type) {
|
||||
var legacyDef = type.toLegacyDefinition();
|
||||
legacyDef.key = key;
|
||||
|
@ -15,16 +15,8 @@ define(function () {
|
||||
*/
|
||||
function Type(definition) {
|
||||
this.definition = definition;
|
||||
this.views = {};
|
||||
}
|
||||
|
||||
Type.prototype.view = function (region, factory) {
|
||||
if (arguments.length > 1) {
|
||||
this.views[region] = factory;
|
||||
}
|
||||
return this.views[region];
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a definition for this type that can be registered using the
|
||||
* legacy bundle format.
|
||||
|
Loading…
Reference in New Issue
Block a user