Fix movement calculations.

This commit is contained in:
Michael Jumper
2014-03-05 01:10:03 -08:00
parent bacc5406ec
commit 4851ba8b5c

View File

@@ -864,8 +864,9 @@ Guacamole.Mouse.Touchscreen = function(element) {
*/
function finger_moved(e) {
var touch = e.touches[0] || e.changedTouches[0];
return Math.abs(touch.clientX - gesture_start_x) >= guac_touchscreen.clickMoveThreshold
&& Math.abs(touch.clientY - gesture_start_y) >= guac_touchscreen.clickMoveThreshold;
var delta_x = touch.clientX - gesture_start_x;
var delta_y = touch.clientY - gesture_start_y;
return Math.sqrt(delta_x*delta_x + delta_y*delta_y) >= guac_touchscreen.clickMoveThreshold;
}
/**