gestures-android icon indicating copy to clipboard operation
gestures-android copied to clipboard

GestureRecognizer matrices (matrix and inverse) should be calculated post-transform

Open pingpongboss opened this issue 8 years ago • 0 comments

Right now it's calculated pre-transform, and is possibly stale post-transform. For example:

View view;
GestureRecognizer gesture;

view.setGestureRecognizer(gesture);

gesture.setOnStateChangeListener({ gesture in
  // gesture.getCentroid() is correct here.
  view.translateX(gesture.getTranslationX());
  // gesture.getCentroid() is now incorrect here.
});

drag(view, 50);

pingpongboss avatar Dec 12 '16 06:12 pingpongboss