[API] Add MCT class

This commit is contained in:
Victor Woeltjen 2016-05-27 11:49:43 -07:00
parent b73b824e55
commit 0c660238f2
3 changed files with 25 additions and 8 deletions

View File

@ -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">

18
main.js
View File

@ -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;
return new Main().run(legacyRegistry); mct.run = mct.start;
} mct.on('start', function () {
}; return new Main().run(legacyRegistry);
});
return mct;
}); });

13
src/MCT.js Normal file
View 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;
});