[Browse] Stopped multiple broadcasts

Stopped the menu arrow from making multiple
broadcasts of contextmenu. #33.
This commit is contained in:
Sarah Hale
2015-06-30 15:22:10 -07:00
parent 917d98bd3e
commit 4840345524
3 changed files with 19 additions and 9 deletions

View File

@ -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 {