mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUAC-957: Do not handle pinch-to-zoom when relative mouse is in use.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user