jmuehlner commented on code in PR #942:
URL: https://github.com/apache/guacamole-client/pull/942#discussion_r1450979717


##########
guacamole/src/main/frontend/src/app/client/controllers/clientController.js:
##########
@@ -468,6 +483,31 @@ 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) => {
+        $scope.$broadcast('guacMouseEvent', mouseEvent);
+    });
+
+    // Broadcast any touch events caught from clients back down to the rest
+    // of the client page
+    $scope.$on('guacClientTouchEvent', (angularEvent, touchEvent) => {
+        $scope.$broadcast('guacTouchEvent', touchEvent);

Review Comment:
   The client versions bubble up from the client directive to the page 
controller, which then broadcasts the non-client versions down to all its 
children. This would allow a field in the client menu to hook into these to 
implement e.g. drag and drop functionality, which would otherwise be precluded 
because the client directive eats up all the mouse and touch events.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to