mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 23:28:14 +00:00
[Code Style] Use prototypes in Browse bundle
WTD-1482.
This commit is contained in:
@ -37,16 +37,25 @@ define(
|
||||
* @constructor
|
||||
*/
|
||||
function MenuArrowController($scope) {
|
||||
function showMenu(event) {
|
||||
var actionContext = {key: 'menu', domainObject: $scope.domainObject, event: event};
|
||||
$scope.domainObject.getCapability('action').perform(actionContext);
|
||||
}
|
||||
|
||||
return {
|
||||
showMenu: showMenu
|
||||
};
|
||||
this.$scope = $scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a context menu for the domain object in this scope.
|
||||
*
|
||||
* @param event the browser event which caused this (used to
|
||||
* position the menu)
|
||||
*/
|
||||
MenuArrowController.prototype.showMenu = function (event) {
|
||||
var actionContext = {
|
||||
key: 'menu',
|
||||
domainObject: this.$scope.domainObject,
|
||||
event: event
|
||||
};
|
||||
|
||||
this.$scope.domainObject.getCapability('action').perform(actionContext);
|
||||
};
|
||||
|
||||
return MenuArrowController;
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user