mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 05:37:53 +00:00
[API] Add MCT class
This commit is contained in:
parent
b73b824e55
commit
0c660238f2
@ -34,7 +34,7 @@
|
|||||||
'./example/imagery/bundle',
|
'./example/imagery/bundle',
|
||||||
'./example/eventGenerator/bundle',
|
'./example/eventGenerator/bundle',
|
||||||
'./example/generator/bundle'
|
'./example/generator/bundle'
|
||||||
], mct.run.bind(mct));
|
], mct.start.bind(mct));
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" href="platform/commonUI/general/res/css/startup-base.css">
|
<link rel="stylesheet" href="platform/commonUI/general/res/css/startup-base.css">
|
||||||
|
16
main.js
16
main.js
@ -62,6 +62,7 @@ requirejs.config({
|
|||||||
define([
|
define([
|
||||||
'./platform/framework/src/Main',
|
'./platform/framework/src/Main',
|
||||||
'legacyRegistry',
|
'legacyRegistry',
|
||||||
|
'./src/MCT',
|
||||||
|
|
||||||
'./platform/framework/bundle',
|
'./platform/framework/bundle',
|
||||||
'./platform/core/bundle',
|
'./platform/core/bundle',
|
||||||
@ -97,11 +98,14 @@ define([
|
|||||||
'./platform/search/bundle',
|
'./platform/search/bundle',
|
||||||
'./platform/status/bundle',
|
'./platform/status/bundle',
|
||||||
'./platform/commonUI/regions/bundle'
|
'./platform/commonUI/regions/bundle'
|
||||||
], function (Main, legacyRegistry) {
|
], function (Main, legacyRegistry, MCT) {
|
||||||
return {
|
var mct = new MCT();
|
||||||
legacyRegistry: legacyRegistry,
|
|
||||||
run: function () {
|
mct.legacyRegistry = legacyRegistry;
|
||||||
|
mct.run = mct.start;
|
||||||
|
mct.on('start', function () {
|
||||||
return new Main().run(legacyRegistry);
|
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