Skip to content

Commit

Permalink
GUACAMOLE-1904: Add new events to allow children to open/close the cl…
Browse files Browse the repository at this point in the history
…ient menu.
  • Loading branch information
jmuehlner committed Jan 11, 2024
1 parent 72e3fa4 commit 9c04863
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,21 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
else if (menuShownPreviousState)
$scope.applyParameterChanges($scope.focusedClient);

/* Broadcast changes to the menu display state */
$scope.$broadcast('guacMenuShown', menuShown);

});

// Toggle the menu when the guacClientToggleMenu event is received
$scope.$on('guacToggleMenu',
() => $scope.menu.shown = !$scope.menu.shown);

// Show the menu when the guacClientShowMenu event is received
$scope.$on('guacShowMenu', () => $scope.menu.shown = true);

// Hide the menu when the guacClientHideMenu event is received
$scope.$on('guacHideMenu', () => $scope.menu.shown = false);

// Broadcast any mouse events caught from clients back down to the rest
// of the client page
$scope.$on('guacClientMouseEvent', (angularEvent, mouseEvent) => {
Expand Down

0 comments on commit 9c04863

Please sign in to comment.