From 1455e5d8b57bce83a685c51e2af63a4feb14d659 Mon Sep 17 00:00:00 2001 From: shale Date: Tue, 14 Jul 2015 13:25:25 -0700 Subject: [PATCH] [Browse] Removed destroy functions Removed destroy functions from menu arrow controller and contetxt menu action as suggested. #33, #47. --- platform/commonUI/browse/src/MenuArrowController.js | 9 ++------- .../representation/src/actions/ContextMenuAction.js | 11 ----------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/platform/commonUI/browse/src/MenuArrowController.js b/platform/commonUI/browse/src/MenuArrowController.js index 309280f5fe..86cad25c0e 100644 --- a/platform/commonUI/browse/src/MenuArrowController.js +++ b/platform/commonUI/browse/src/MenuArrowController.js @@ -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 }; } diff --git a/platform/representation/src/actions/ContextMenuAction.js b/platform/representation/src/actions/ContextMenuAction.js index ee85b2f900..390531053e 100644 --- a/platform/representation/src/actions/ContextMenuAction.js +++ b/platform/representation/src/actions/ContextMenuAction.js @@ -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 }; }