mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
!46971 timepicker速度数据未清空
Merge pull request !46971 from zhaoyong/timepicker
This commit is contained in:
commit
52633dc31b
@ -207,6 +207,11 @@ void TimePickerHapticController::HandleDelta(double dy)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TimePickerHapticController::ClearVelocityInfo()
|
||||||
|
{
|
||||||
|
velocityTracker_.Reset();
|
||||||
|
}
|
||||||
|
|
||||||
double TimePickerHapticController::ConvertPxToMillimeters(double px) const
|
double TimePickerHapticController::ConvertPxToMillimeters(double px) const
|
||||||
{
|
{
|
||||||
auto& manager = ScreenSystemManager::GetInstance();
|
auto& manager = ScreenSystemManager::GetInstance();
|
||||||
|
@ -48,6 +48,7 @@ public:
|
|||||||
void PlayOnce() override;
|
void PlayOnce() override;
|
||||||
void Stop() override;
|
void Stop() override;
|
||||||
void HandleDelta(double dy) override;
|
void HandleDelta(double dy) override;
|
||||||
|
void ClearVelocityInfo() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ThreadLoop();
|
void ThreadLoop();
|
||||||
|
@ -50,4 +50,11 @@ void TimepickerAudioHapticImpl::HandleDelta(double dy)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TimepickerAudioHapticImpl::ClearVelocityInfo()
|
||||||
|
{
|
||||||
|
if (handler_) {
|
||||||
|
handler_->ClearVelocityInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace OHOS::Ace::NG
|
} // namespace OHOS::Ace::NG
|
||||||
|
@ -28,6 +28,7 @@ public:
|
|||||||
void PlayOnce() override;
|
void PlayOnce() override;
|
||||||
void Stop() override;
|
void Stop() override;
|
||||||
void HandleDelta(double dy) override;
|
void HandleDelta(double dy) override;
|
||||||
|
void ClearVelocityInfo() override;
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<TimePickerHapticController> handler_ = nullptr;
|
std::unique_ptr<TimePickerHapticController> handler_ = nullptr;
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,7 @@ public:
|
|||||||
void PlayOnce() {}
|
void PlayOnce() {}
|
||||||
void Stop() {}
|
void Stop() {}
|
||||||
void HandleDelta(double dy) {}
|
void HandleDelta(double dy) {}
|
||||||
|
void ClearVelocityInfo() {}
|
||||||
};
|
};
|
||||||
} // namespace OHOS::Ace::NG
|
} // namespace OHOS::Ace::NG
|
||||||
#endif // FOUNDATION_ACE_ENGINE_ADAPTER_OHOS_TIMEPICKER_AUDIO_HAPTIC_STUB_H
|
#endif // FOUNDATION_ACE_ENGINE_ADAPTER_OHOS_TIMEPICKER_AUDIO_HAPTIC_STUB_H
|
||||||
|
@ -870,6 +870,7 @@ void TimePickerColumnPattern::HandleDragEnd()
|
|||||||
{
|
{
|
||||||
if (hapticController_) {
|
if (hapticController_) {
|
||||||
hapticController_->Stop();
|
hapticController_->Stop();
|
||||||
|
hapticController_->ClearVelocityInfo();
|
||||||
}
|
}
|
||||||
pressed_ = false;
|
pressed_ = false;
|
||||||
CHECK_NULL_VOID(GetHost());
|
CHECK_NULL_VOID(GetHost());
|
||||||
|
@ -26,6 +26,7 @@ public:
|
|||||||
virtual void PlayOnce() = 0;
|
virtual void PlayOnce() = 0;
|
||||||
virtual void Stop() = 0;
|
virtual void Stop() = 0;
|
||||||
virtual void HandleDelta(double dy) = 0;
|
virtual void HandleDelta(double dy) = 0;
|
||||||
|
virtual void ClearVelocityInfo() = 0;
|
||||||
};
|
};
|
||||||
} // namespace OHOS::Ace::NG
|
} // namespace OHOS::Ace::NG
|
||||||
#endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_TIME_PICKER_AUDIO_HAPTIC_INTERFACE_H
|
#endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_TIME_PICKER_AUDIO_HAPTIC_INTERFACE_H
|
||||||
|
Loading…
Reference in New Issue
Block a user