Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed initial offset calculation for PanGesture

  • Loading branch information...
commit 62fa492d663c45972e6f232c9dc2a4daa4328fd0 1 parent 696b636
@fljot authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/org/gestouch/gestures/PanGesture.as
View
7 src/org/gestouch/gestures/PanGesture.as
@@ -136,6 +136,10 @@ package org.gestouch.gestures
if (state == GestureState.POSSIBLE)
{
+ prevLocationX = _location.x;
+ prevLocationY = _location.y;
+ updateLocation();
+
// Check if finger moved enough for gesture to be recognized
var locationOffset:Point = touch.locationOffset;
if (direction == PanGestureDirection.VERTICAL)
@@ -149,9 +153,6 @@ package org.gestouch.gestures
if (locationOffset.length > slop || slop != slop)//faster isNaN(slop)
{
- prevLocationX = _location.x;
- prevLocationY = _location.y;
- updateLocation();
offsetX = _location.x - prevLocationX;
offsetY = _location.y - prevLocationY;
// acummulate begin offsets for the case when this gesture recognition is delayed by requireGestureToFail
Please sign in to comment.
Something went wrong with that request. Please try again.