[Selection] Inject actionRegistry

This commit is contained in:
Victor Woeltjen 2016-09-23 15:48:43 -07:00
parent 8b44b44e38
commit 407550e6f4

View File

@ -22,6 +22,7 @@
define([ define([
'EventEmitter', 'EventEmitter',
'./Registry',
'./selection/Selection', './selection/Selection',
'./selection/ContextManager', './selection/ContextManager',
'./selection/SelectGesture', './selection/SelectGesture',
@ -29,6 +30,7 @@ define([
'./ui/ViewRegistry' './ui/ViewRegistry'
], function ( ], function (
EventEmitter, EventEmitter,
Registry,
Selection, Selection,
ContextManager, ContextManager,
SelectGesture, SelectGesture,
@ -36,15 +38,20 @@ define([
ViewRegistry ViewRegistry
) { ) {
var openmct = Object.create(EventEmitter.prototype); var openmct = Object.create(EventEmitter.prototype);
var actionRegistry = new Registry();
var selection = new Selection(); var selection = new Selection();
var manager = new ContextManager(); var manager = new ContextManager();
var select = new SelectGesture(manager, selection); var select = new SelectGesture(manager, selection);
var contextMenu = new ContextMenuGesture(selection, {}, {}, manager); var contextMenu = new ContextMenuGesture(
selection,
{},
actionRegistry,
manager
);
EventEmitter.call(openmct); EventEmitter.call(openmct);
openmct.selection = selection; openmct.selection = selection;
openmct.inspectors = new ViewRegistry(); openmct.inspectors = new ViewRegistry();
openmct.gestures = { openmct.gestures = {