修复List链式动效边缘效果异常问题

Signed-off-by: yeyinglong_admin <yeyinglong@hisilicon.com>
This commit is contained in:
yeyinglong_admin 2024-10-05 17:27:41 +08:00
parent bab7266899
commit 8dab21f0cf
2 changed files with 6 additions and 1 deletions

View File

@ -822,7 +822,7 @@ void ListLayoutAlgorithm::MeasureList(LayoutWrapper* layoutWrapper)
}
} else {
jumpIndexInGroup_.reset();
bool overScrollTop = startIndex == 0 && GreatNotEqual(startPos, contentStartOffset_);
bool overScrollTop = startIndex == 0 && GreatNotEqual(startPos + GetChainOffset(0), contentStartOffset_);
float midItemHeight = 0.0f;
if (IsScrollSnapAlignCenter(layoutWrapper)) {
midItemHeight = childrenSize_ ?

View File

@ -303,6 +303,11 @@ public:
chainOffsetFunc_ = std::move(func);
}
float GetChainOffset(int32_t index) const
{
return chainOffsetFunc_ ? chainOffsetFunc_(index) : 0.0f;
}
void SetChainInterval(float interval)
{
chainInterval_ = interval;