mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
Merge branch 'master' into open671
This commit is contained in:
@ -39,32 +39,16 @@ define(
|
||||
* in the context menu will be performed
|
||||
* @implements {Gesture}
|
||||
*/
|
||||
function ContextMenuGesture($timeout, $parse, agentService, navigationService, element, domainObject) {
|
||||
function ContextMenuGesture($timeout, agentService, element, domainObject) {
|
||||
var isPressing,
|
||||
longTouchTime = 500,
|
||||
parameters = element && element.attr('parameters') && $parse(element.attr('parameters'))();
|
||||
|
||||
function suppressMenu() {
|
||||
return parameters &&
|
||||
parameters.suppressMenuOnEdit &&
|
||||
navigationService.getNavigation() &&
|
||||
navigationService.getNavigation().hasCapability('editor');
|
||||
}
|
||||
longTouchTime = 500;
|
||||
|
||||
function showMenu(event) {
|
||||
/**
|
||||
* Some menu items should have the context menu action
|
||||
* suppressed (eg. the navigation menu on the left)
|
||||
*/
|
||||
if (suppressMenu()){
|
||||
return;
|
||||
} else {
|
||||
domainObject.getCapability('action').perform({
|
||||
key: 'menu',
|
||||
domainObject: domainObject,
|
||||
event: event
|
||||
});
|
||||
}
|
||||
domainObject.getCapability('action').perform({
|
||||
key: 'menu',
|
||||
domainObject: domainObject,
|
||||
event: event
|
||||
});
|
||||
}
|
||||
|
||||
// When context menu event occurs, show object actions instead
|
||||
|
Reference in New Issue
Block a user