mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-04-09 11:32:17 +00:00
TouchMove点不重新采样,up点不参与计算抛滑速率
Signed-off-by: longruoluo <long.liu@huawei.com> Change-Id: I07926c294a7d2b7c7ad25fbfb07784f253e8a257
This commit is contained in:
parent
6e6335dcb2
commit
3d41aaff61
@ -291,12 +291,13 @@ void PanRecognizer::HandleTouchUpEvent(const TouchEvent& event)
|
|||||||
|
|
||||||
// In CrossPlatform, MOVE point has sampled, but the UP point is original coordinate,
|
// In CrossPlatform, MOVE point has sampled, but the UP point is original coordinate,
|
||||||
// and participating in the Velocity calculation may cause abnormal rates
|
// and participating in the Velocity calculation may cause abnormal rates
|
||||||
if (currentFingers_ == fingers_ && !SystemProperties::IsNeedResampleTouchPoints()) {
|
if (currentFingers_ == fingers_ && SystemProperties::IsNeedResampleTouchPoints()) {
|
||||||
UpdateTouchPointInVelocityTracker(event);
|
UpdateTouchPointInVelocityTracker(event);
|
||||||
} else if (currentFingers_ > fingers_) {
|
} else if (currentFingers_ > fingers_) {
|
||||||
panVelocity_.Reset(event.id);
|
panVelocity_.Reset(event.id);
|
||||||
UpdateTouchPointInVelocityTracker(event);
|
UpdateTouchPointInVelocityTracker(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateTouchEventInfo(event);
|
UpdateTouchEventInfo(event);
|
||||||
|
|
||||||
if ((currentFingers_ <= fingers_) &&
|
if ((currentFingers_ <= fingers_) &&
|
||||||
|
@ -3337,7 +3337,7 @@ void PipelineContext::FlushTouchEvents()
|
|||||||
if (focusWindowId_.has_value()) {
|
if (focusWindowId_.has_value()) {
|
||||||
needInterpolation = false;
|
needInterpolation = false;
|
||||||
}
|
}
|
||||||
if (needInterpolation) {
|
if (needInterpolation && SystemProperties::IsNeedResampleTouchPoints()) {
|
||||||
auto targetTimeStamp = resampleTimeStamp_;
|
auto targetTimeStamp = resampleTimeStamp_;
|
||||||
for (const auto& idIter : idToTouchPoints) {
|
for (const auto& idIter : idToTouchPoints) {
|
||||||
auto stamp =
|
auto stamp =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user