PanGestures - Adjust average gesture movement for better displacement value
authorJulien Heanley <j.heanley@partner.samsung.com>
Fri, 30 May 2014 06:12:45 +0000 (07:12 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 10 Jun 2014 14:58:00 +0000 (15:58 +0100)
Change-Id: Ia5af0c9c3c5178d51449ac85f0040a821d380cbd
Signed-off-by: Julien Heanley <j.heanley@partner.samsung.com>
dali/internal/update/gestures/scene-graph-pan-gesture.cpp

index 785ef09..4b0313f 100644 (file)
@@ -84,8 +84,8 @@ void PanGesture::SimpleAverageAlgorithm(bool justStarted, PanInfo& gestureOut)
       gestureOut.screen.position *= 0.5f;
       gestureOut.local.position *= 0.5f;
       // make current displacement relative to previous update-frame now.
-      gestureOut.screen.displacement = mLastEventGesture.screen.position - gestureOut.screen.position;
-      gestureOut.local.displacement = mLastEventGesture.local.position - gestureOut.local.position;
+      gestureOut.screen.displacement = gestureOut.screen.position - mLastEventGesture.screen.position;
+      gestureOut.local.displacement = gestureOut.local.position - mLastEventGesture.local.position;
     }
   }
 }