[Selection] Expose contextual gesture

This commit is contained in:
Victor Woeltjen 2016-09-22 11:48:44 -07:00
parent 152f55652f
commit fdab4a614f

View File

@ -24,19 +24,28 @@ define([
'./selection/Selection', './selection/Selection',
'./selection/ContextManager', './selection/ContextManager',
'./selection/SelectGesture', './selection/SelectGesture',
'./ui/menu/ContextMenuGesture',
'./ui/ViewRegistry' './ui/ViewRegistry'
], function (Selection, ContextManager, SelectGesture, ViewRegistry) { ], function (
Selection,
ContextManager,
SelectGesture,
ContextMenuGesture,
ViewRegistry
) {
var openmct = {}; var openmct = {};
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);
openmct.selection = selection; openmct.selection = selection;
openmct.inspectors = new ViewRegistry(); openmct.inspectors = new ViewRegistry();
openmct.gestures = { openmct.gestures = {
selectable: select.apply.bind(select) selectable: select.apply.bind(select),
contextual: contextMenu.apply.bind(contextMenu)
}; };
return openmct; return openmct;