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 12, 2024
1 parent 4d85c81 commit 2a18c33
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);

// Automatically track and cache the currently-focused client
$scope.$on('guacClientFocused', function focusedClientChanged(event, newFocusedClient) {

Expand Down

0 comments on commit 2a18c33

Please sign in to comment.