mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 23:28:14 +00:00
[Browse] Stopped multiple broadcasts
Stopped the menu arrow from making multiple broadcasts of contextmenu. #33.
This commit is contained in:
@ -35,12 +35,16 @@ define(
|
||||
* menu.
|
||||
* @constructor
|
||||
*/
|
||||
function MenuArrowController($rootScope) {
|
||||
function MenuArrowController($rootScope, $scope) {
|
||||
|
||||
function contextMenu() {
|
||||
console.log('contextMenu() called');
|
||||
//console.log('editor? ', $scope.domainObject.hasCapability('editor'));
|
||||
|
||||
$rootScope.$broadcast('contextmenu');
|
||||
if (true || $scope.domainObject.hasCapability('editor')) {
|
||||
//$rootScope.$broadcast('contextmenu');
|
||||
$scope.$emit('contextmenu');
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user