Bug 963270: Use first and second touches for pinch gesture detection r=kats

This commit is contained in:
Doug Sherk 2014-01-23 18:42:49 -05:00
Родитель 75b753ee2f
Коммит 98ee63ffd2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -215,7 +215,7 @@ nsEventStatus GestureEventListener::HandlePinchGestureEvent(const MultiTouchInpu
if (mTouches.Length() > 1 && !aClearTouches) {
const ScreenIntPoint& firstTouch = mTouches[0].mScreenPoint,
secondTouch = mTouches[mTouches.Length() - 1].mScreenPoint;
secondTouch = mTouches[1].mScreenPoint;
ScreenPoint focusPoint = ScreenPoint(firstTouch + secondTouch) / 2;
ScreenIntPoint delta = secondTouch - firstTouch;
float currentSpan = float(NS_hypot(delta.x, delta.y));