mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
!48652 修复滚动组件限位动画期间速度为0的问题
Merge pull request !48652 from honzx/1114contextBugfix
This commit is contained in:
commit
75fdf12518
@ -1217,7 +1217,7 @@ RefPtr<NodeAnimatablePropertyFloat> Scrollable::GetSnapProperty()
|
||||
}
|
||||
auto context = scroll->context_.Upgrade();
|
||||
CHECK_NULL_VOID(context);
|
||||
uint64_t currentVsync = scroll->context_.Upgrade();
|
||||
uint64_t currentVsync = context->GetVsyncTime();
|
||||
uint64_t diff = currentVsync - scroll->lastVsyncTime_;
|
||||
if (diff < MAX_VSYNC_DIFF_TIME && diff > MIN_DIFF_VSYNC) {
|
||||
scroll->snapVelocity_ = (position - scroll->currentPos_) / diff * MILLOS_PER_NANO_SECONDS;
|
||||
|
Loading…
Reference in New Issue
Block a user