mirror of
https://github.com/nasa/openmct.git
synced 2025-04-11 05:10:21 +00:00
[Browse] Removed destroy functions
Removed destroy functions from menu arrow controller and contetxt menu action as suggested. #33, #47.
This commit is contained in:
parent
d1b55bd43e
commit
1455e5d8b5
@ -36,18 +36,13 @@ define(
|
||||
* @constructor
|
||||
*/
|
||||
function MenuArrowController($scope) {
|
||||
var stop;
|
||||
|
||||
function showMenu(event) {
|
||||
var actionContext = {key: 'menu', domainObject: $scope.domainObject, event: event};
|
||||
stop = $scope.domainObject.getCapability('action').perform(actionContext);
|
||||
$scope.domainObject.getCapability('action').perform(actionContext);
|
||||
}
|
||||
|
||||
return {
|
||||
showMenu: showMenu,
|
||||
destroy: function () {
|
||||
stop();
|
||||
}
|
||||
showMenu: showMenu
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -107,17 +107,6 @@ define(
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* Dismiss any visible menu.
|
||||
* @method
|
||||
* @memberof ContextMenuAction
|
||||
*/
|
||||
destroy: function () {
|
||||
// Scope has been destroyed, so remove all listeners.
|
||||
if (dismissExistingMenu) {
|
||||
dismissExistingMenu();
|
||||
}
|
||||
},
|
||||
perform: perform
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user