зеркало из https://github.com/mozilla/gecko-dev.git
Bug 779572: Factor zoom into min pan distance before moving the viewport r=cjones
This commit is contained in:
Родитель
8b64f2b23f
Коммит
298a698b2f
|
@ -238,10 +238,13 @@ nsEventStatus AsyncPanZoomController::OnTouchMove(const MultiTouchInput& aEvent)
|
|||
case TOUCHING: {
|
||||
float panThreshold = 1.0f/2.0f * mDPI;
|
||||
UpdateWithTouchAtDevicePoint(aEvent);
|
||||
|
||||
if (PanDistance() < panThreshold) {
|
||||
return nsEventStatus_eIgnore;
|
||||
}
|
||||
|
||||
StartPanning(aEvent);
|
||||
|
||||
return nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
|
||||
|
@ -442,7 +445,8 @@ nsEventStatus AsyncPanZoomController::OnCancelTap(const TapGestureInput& aEvent)
|
|||
}
|
||||
|
||||
float AsyncPanZoomController::PanDistance() {
|
||||
return NS_hypot(mX.PanDistance(), mY.PanDistance()) * mFrameMetrics.mResolution.width;
|
||||
MonitorAutoLock monitor(mMonitor);
|
||||
return NS_hypot(mX.PanDistance(), mY.PanDistance());
|
||||
}
|
||||
|
||||
const nsPoint AsyncPanZoomController::GetVelocityVector() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче