mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1204: Allow pinch/drag touch gestures to be tracked in addition to any local touch event pass-through.
This commit is contained in:
@@ -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() {
|
||||||
|
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user