mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 23:53:49 +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:
@ -36,18 +36,13 @@ define(
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function MenuArrowController($scope) {
|
function MenuArrowController($scope) {
|
||||||
var stop;
|
|
||||||
|
|
||||||
function showMenu(event) {
|
function showMenu(event) {
|
||||||
var actionContext = {key: 'menu', domainObject: $scope.domainObject, event: event};
|
var actionContext = {key: 'menu', domainObject: $scope.domainObject, event: event};
|
||||||
stop = $scope.domainObject.getCapability('action').perform(actionContext);
|
$scope.domainObject.getCapability('action').perform(actionContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
showMenu: showMenu,
|
showMenu: showMenu
|
||||||
destroy: function () {
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,17 +107,6 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
/**
|
|
||||||
* Dismiss any visible menu.
|
|
||||||
* @method
|
|
||||||
* @memberof ContextMenuAction
|
|
||||||
*/
|
|
||||||
destroy: function () {
|
|
||||||
// Scope has been destroyed, so remove all listeners.
|
|
||||||
if (dismissExistingMenu) {
|
|
||||||
dismissExistingMenu();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
perform: perform
|
perform: perform
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user