mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 17:21:11 +00:00
修复链式动效边缘回弹问题
Signed-off-by: yeyinglong_admin <yeyinglong@hisilicon.com>
This commit is contained in:
parent
c35afa8d10
commit
c0426aeb6b
@ -2007,6 +2007,13 @@ void ListPattern::ProcessDragUpdate(float dragOffset, int32_t source)
|
||||
}
|
||||
bool overDrag = (source == SCROLL_FROM_UPDATE) && (IsAtTop() || IsAtBottom());
|
||||
chainAnimation_->SetDelta(-dragOffset, overDrag);
|
||||
if (source == SCROLL_FROM_UPDATE && GetCanOverScroll()) {
|
||||
float tempDelta = currentDelta_;
|
||||
currentDelta_ -= dragOffset;
|
||||
bool isAtEdge = IsAtTop() || IsAtBottom();
|
||||
currentDelta_ = tempDelta;
|
||||
SetCanOverScroll(isAtEdge);
|
||||
}
|
||||
}
|
||||
|
||||
float ListPattern::GetChainDelta(int32_t index) const
|
||||
|
@ -752,6 +752,9 @@ protected:
|
||||
return scrollOriginChild_.Upgrade();
|
||||
}
|
||||
|
||||
void SetCanOverScroll(bool val);
|
||||
bool GetCanOverScroll() const;
|
||||
|
||||
private:
|
||||
virtual void OnScrollEndCallback() {};
|
||||
|
||||
@ -820,9 +823,6 @@ private:
|
||||
|
||||
void ExecuteScrollFrameBegin(float& mainDelta, ScrollState state);
|
||||
|
||||
void SetCanOverScroll(bool val);
|
||||
bool GetCanOverScroll() const;
|
||||
|
||||
void OnScrollEnd();
|
||||
void ProcessSpringEffect(float velocity, bool needRestart = false);
|
||||
void SetEdgeEffect(EdgeEffect edgeEffect);
|
||||
|
Loading…
Reference in New Issue
Block a user