From fd944b71a3be121be527884bb3c799946b7bc9ae Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 28 Dec 2014 15:15:09 -0800 Subject: [PATCH] GUAC-957: Do not handle pinch-to-zoom when relative mouse is in use. --- .../webapp/app/client/controllers/clientController.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index fd03d5508..63411b4e6 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -23,7 +23,7 @@ /** * The controller for the page used to connect to a connection or balancing group. */ -angular.module('home').controller('clientController', ['$scope', '$routeParams', '$injector', +angular.module('client').controller('clientController', ['$scope', '$routeParams', '$injector', function clientController($scope, $routeParams, $injector) { // Required types @@ -304,6 +304,10 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', // Zoom and pan client via pinch gestures $scope.clientPinch = function clientPinch(inProgress, startLength, currentLength, centerX, centerY) { + // Do not handle pinch gestures while relative mouse is in use + if (!$scope.clientProperties.emulateAbsoluteMouse) + return false; + // Stop gesture if not in progress if (!inProgress) { initialScale = null; @@ -318,7 +322,7 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', } // Determine new scale absolutely - currentScale = initialScale * currentLength / startLength; + var currentScale = initialScale * currentLength / startLength; // Fix scale within limits - scroll will be miscalculated otherwise currentScale = Math.max(currentScale, $scope.clientProperties.minScale);