fix smoothscrolltoposition

This commit is contained in:
侯歌 2024-07-31 17:10:08 +08:00
parent 28e122f8db
commit 72db57e6a7
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ int LinearSmoothScroller::getVerticalSnapPreference() {
mTargetVector.y > 0 ? SNAP_TO_END : SNAP_TO_START;
}
void LinearSmoothScroller::updateActionForInterimTarget(Action action) {
void LinearSmoothScroller::updateActionForInterimTarget(Action& action) {
// find an interim target position
PointF scrollVector;
mTargetVectorUsable = computeScrollVectorForPosition(getTargetPosition(),scrollVector);

View File

@ -37,7 +37,7 @@ public:
int calculateTimeForScrolling(int dx);
int getHorizontalSnapPreference();
int getVerticalSnapPreference();
void updateActionForInterimTarget(Action action);
void updateActionForInterimTarget(Action& action);
int clampApplyScroll(int tmpDt, int dt);
virtual int calculateDtToFit(int viewStart, int viewEnd, int boxStart, int boxEnd, int
snapPreference);