mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 07:16:39 +00:00
[API] Rename MCT to OpenMCT
This commit is contained in:
parent
6a23df9454
commit
50ccad5aaa
@ -25,7 +25,7 @@ define([
|
|||||||
* @constructor MCT
|
* @constructor MCT
|
||||||
* @augments {EventEmitter}
|
* @augments {EventEmitter}
|
||||||
*/
|
*/
|
||||||
function MCT() {
|
function OpenMCT() {
|
||||||
EventEmitter.call(this);
|
EventEmitter.call(this);
|
||||||
this.legacyBundle = { extensions: {} };
|
this.legacyBundle = { extensions: {} };
|
||||||
|
|
||||||
@ -33,14 +33,14 @@ define([
|
|||||||
this.on('navigation', this.selection.clear.bind(this.selection));
|
this.on('navigation', this.selection.clear.bind(this.selection));
|
||||||
}
|
}
|
||||||
|
|
||||||
MCT.prototype = Object.create(EventEmitter.prototype);
|
OpenMCT.prototype = Object.create(EventEmitter.prototype);
|
||||||
|
|
||||||
Object.keys(api).forEach(function (k) {
|
Object.keys(api).forEach(function (k) {
|
||||||
MCT.prototype[k] = api[k];
|
OpenMCT.prototype[k] = api[k];
|
||||||
});
|
});
|
||||||
MCT.prototype.MCT = MCT;
|
OpenMCT.prototype.OpenMCT = OpenMCT;
|
||||||
|
|
||||||
MCT.prototype.legacyExtension = function (category, extension) {
|
OpenMCT.prototype.legacyExtension = function (category, extension) {
|
||||||
this.legacyBundle.extensions[category] =
|
this.legacyBundle.extensions[category] =
|
||||||
this.legacyBundle.extensions[category] || [];
|
this.legacyBundle.extensions[category] || [];
|
||||||
this.legacyBundle.extensions[category].push(extension);
|
this.legacyBundle.extensions[category].push(extension);
|
||||||
@ -49,7 +49,7 @@ define([
|
|||||||
/**
|
/**
|
||||||
* Set path to where assets are hosted. This should be the path to main.js.
|
* Set path to where assets are hosted. This should be the path to main.js.
|
||||||
*/
|
*/
|
||||||
MCT.prototype.setAssetPath = function (path) {
|
OpenMCT.prototype.setAssetPath = function (path) {
|
||||||
this.legacyExtension('constants', {
|
this.legacyExtension('constants', {
|
||||||
key: "ASSETS_PATH",
|
key: "ASSETS_PATH",
|
||||||
value: path
|
value: path
|
||||||
@ -62,7 +62,7 @@ define([
|
|||||||
* @param region the region identifier (see mct.regions)
|
* @param region the region identifier (see mct.regions)
|
||||||
* @param {ViewDefinition} definition the definition for this view
|
* @param {ViewDefinition} definition the definition for this view
|
||||||
*/
|
*/
|
||||||
MCT.prototype.view = function (region, definition) {
|
OpenMCT.prototype.view = function (region, definition) {
|
||||||
var viewKey = region + uuid();
|
var viewKey = region + uuid();
|
||||||
var adaptedViewKey = "adapted-view-" + region;
|
var adaptedViewKey = "adapted-view-" + region;
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ define([
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
MCT.prototype.type = function (key, type) {
|
OpenMCT.prototype.type = function (key, type) {
|
||||||
var legacyDef = type.toLegacyDefinition();
|
var legacyDef = type.toLegacyDefinition();
|
||||||
legacyDef.key = key;
|
legacyDef.key = key;
|
||||||
type.key = key;
|
type.key = key;
|
||||||
@ -125,11 +125,11 @@ define([
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
MCT.prototype.dialog = function (view, title) {
|
OpenMCT.prototype.dialog = function (view, title) {
|
||||||
return new Dialog(view, title).show();
|
return new Dialog(view, title).show();
|
||||||
};
|
};
|
||||||
|
|
||||||
MCT.prototype.start = function () {
|
OpenMCT.prototype.start = function () {
|
||||||
this.legacyExtension('runs', {
|
this.legacyExtension('runs', {
|
||||||
depends: ['navigationService'],
|
depends: ['navigationService'],
|
||||||
implementation: function (navigationService) {
|
implementation: function (navigationService) {
|
||||||
@ -149,14 +149,14 @@ define([
|
|||||||
* @param `Function` plugin -- a plugin install function which will be
|
* @param `Function` plugin -- a plugin install function which will be
|
||||||
* invoked with the mct instance.
|
* invoked with the mct instance.
|
||||||
*/
|
*/
|
||||||
MCT.prototype.install = function (plugin) {
|
OpenMCT.prototype.install = function (plugin) {
|
||||||
plugin(this);
|
plugin(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
MCT.prototype.regions = {
|
OpenMCT.prototype.regions = {
|
||||||
main: "MAIN",
|
main: "MAIN",
|
||||||
toolbar: "TOOLBAR"
|
toolbar: "TOOLBAR"
|
||||||
};
|
};
|
||||||
|
|
||||||
return MCT;
|
return OpenMCT;
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user