GUACAMOLE-1204: Allow pinch/drag touch gestures to be tracked in addition to any local touch event pass-through.

This commit is contained in:
Michael Jumper
2021-02-10 13:09:32 -08:00
parent 483aa14cac
commit 5d6c176a94
2 changed files with 0 additions and 8 deletions

View File

@@ -124,8 +124,6 @@ angular.module('touch').directive('guacTouchDrag', [function guacTouchDrag() {
element.addEventListener("touchmove", function dragTouchMove(e) { element.addEventListener("touchmove", function dragTouchMove(e) {
if (e.touches.length === 1) { if (e.touches.length === 1) {
e.stopPropagation();
// Get touch location // Get touch location
var x = e.touches[0].clientX; var x = e.touches[0].clientX;
var y = e.touches[0].clientY; var y = e.touches[0].clientY;
@@ -163,8 +161,6 @@ angular.module('touch').directive('guacTouchDrag', [function guacTouchDrag() {
if (startX && startY && e.touches.length === 0) { if (startX && startY && e.touches.length === 0) {
e.stopPropagation();
// Signal end of drag gesture // Signal end of drag gesture
if (inProgress && guacTouchDrag) { if (inProgress && guacTouchDrag) {
$scope.$apply(function dragComplete() { $scope.$apply(function dragComplete() {

View File

@@ -159,8 +159,6 @@ angular.module('touch').directive('guacTouchPinch', [function guacTouchPinch() {
element.addEventListener("touchmove", function pinchTouchMove(e) { element.addEventListener("touchmove", function pinchTouchMove(e) {
if (e.touches.length === 2) { if (e.touches.length === 2) {
e.stopPropagation();
// Calculate current zoom level // Calculate current zoom level
currentLength = pinchDistance(e); currentLength = pinchDistance(e);
@@ -188,8 +186,6 @@ angular.module('touch').directive('guacTouchPinch', [function guacTouchPinch() {
if (startLength && e.touches.length < 2) { if (startLength && e.touches.length < 2) {
e.stopPropagation();
// Notify of pinch end // Notify of pinch end
if (guacTouchPinch) { if (guacTouchPinch) {
$scope.$apply(function pinchComplete() { $scope.$apply(function pinchComplete() {