mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1063224 - Add a PanStart() method to AsyncPanZoomController. r=kats
--HG-- extra : source : c26cacfcd1998dddd2982062c844e10bc5736541
This commit is contained in:
parent
1b53050363
commit
60dc6f5474
@ -1726,6 +1726,10 @@ float AsyncPanZoomController::PanDistance() const {
|
||||
return NS_hypot(mX.PanDistance(), mY.PanDistance());
|
||||
}
|
||||
|
||||
ScreenPoint AsyncPanZoomController::PanStart() const {
|
||||
return ScreenPoint(mX.PanStart(), mY.PanStart());
|
||||
}
|
||||
|
||||
const ScreenPoint AsyncPanZoomController::GetVelocityVector() {
|
||||
return ScreenPoint(mX.GetVelocity(), mY.GetVelocity());
|
||||
}
|
||||
|
@ -488,6 +488,16 @@ protected:
|
||||
*/
|
||||
float PanDistance() const;
|
||||
|
||||
/**
|
||||
* Gets the start point of the current touch.
|
||||
* Like PanDistance(), this only makes sense if a touch is currently
|
||||
* happening and OnTouchMove() or the equivalent for pan gestures is
|
||||
* being invoked.
|
||||
* Unlikely PanDistance(), this function returns a point in local screen
|
||||
* coordinates.
|
||||
*/
|
||||
ScreenPoint PanStart() const;
|
||||
|
||||
/**
|
||||
* Gets a vector of the velocities of each axis.
|
||||
*/
|
||||
|
@ -207,6 +207,10 @@ void Axis::ClearOverscroll() {
|
||||
mOverscroll = 0;
|
||||
}
|
||||
|
||||
ScreenCoord Axis::PanStart() const {
|
||||
return mStartPos;
|
||||
}
|
||||
|
||||
ScreenCoord Axis::PanDistance() const {
|
||||
return fabs(mPos - mStartPos);
|
||||
}
|
||||
|
@ -118,16 +118,21 @@ public:
|
||||
*/
|
||||
void ClearOverscroll();
|
||||
|
||||
/**
|
||||
* Gets the starting position of the touch supplied in StartTouch().
|
||||
*/
|
||||
ScreenCoord PanStart() const;
|
||||
|
||||
/**
|
||||
* Gets the distance between the starting position of the touch supplied in
|
||||
* startTouch() and the current touch from the last
|
||||
* updateWithTouchAtDevicePoint().
|
||||
* StartTouch() and the current touch from the last
|
||||
* UpdateWithTouchAtDevicePoint().
|
||||
*/
|
||||
ScreenCoord PanDistance() const;
|
||||
|
||||
/**
|
||||
* Gets the distance between the starting position of the touch supplied in
|
||||
* startTouch() and the supplied position.
|
||||
* StartTouch() and the supplied position.
|
||||
*/
|
||||
ScreenCoord PanDistance(ScreenCoord aPos) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user