mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 21:27:52 +00:00
[API] Add MCT class
This commit is contained in:
parent
b73b824e55
commit
0c660238f2
@ -34,7 +34,7 @@
|
||||
'./example/imagery/bundle',
|
||||
'./example/eventGenerator/bundle',
|
||||
'./example/generator/bundle'
|
||||
], mct.run.bind(mct));
|
||||
], mct.start.bind(mct));
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" href="platform/commonUI/general/res/css/startup-base.css">
|
||||
|
18
main.js
18
main.js
@ -62,6 +62,7 @@ requirejs.config({
|
||||
define([
|
||||
'./platform/framework/src/Main',
|
||||
'legacyRegistry',
|
||||
'./src/MCT',
|
||||
|
||||
'./platform/framework/bundle',
|
||||
'./platform/core/bundle',
|
||||
@ -97,11 +98,14 @@ define([
|
||||
'./platform/search/bundle',
|
||||
'./platform/status/bundle',
|
||||
'./platform/commonUI/regions/bundle'
|
||||
], function (Main, legacyRegistry) {
|
||||
return {
|
||||
legacyRegistry: legacyRegistry,
|
||||
run: function () {
|
||||
return new Main().run(legacyRegistry);
|
||||
}
|
||||
};
|
||||
], function (Main, legacyRegistry, MCT) {
|
||||
var mct = new MCT();
|
||||
|
||||
mct.legacyRegistry = legacyRegistry;
|
||||
mct.run = mct.start;
|
||||
mct.on('start', function () {
|
||||
return new Main().run(legacyRegistry);
|
||||
});
|
||||
|
||||
return mct;
|
||||
});
|
||||
|
13
src/MCT.js
Normal file
13
src/MCT.js
Normal file
@ -0,0 +1,13 @@
|
||||
define(['EventEmitter'], function (EventEmitter) {
|
||||
function MCT() {
|
||||
EventEmitter.call(this);
|
||||
}
|
||||
|
||||
MCT.prototype = Object.create(EventEmitter.prototype);
|
||||
|
||||
MCT.prototype.start = function () {
|
||||
this.emit('start');
|
||||
};
|
||||
|
||||
return MCT;
|
||||
});
|
Loading…
Reference in New Issue
Block a user