提交 ceb00008 编写于 作者: O openharmony_ci 提交者: Gitee

!406 UISwipeView旋转事件结束未振动问题

Merge pull request !406 from pssea/master
...@@ -203,7 +203,6 @@ bool UISwipeView::OnRotateStartEvent(const RotateEvent& event) ...@@ -203,7 +203,6 @@ bool UISwipeView::OnRotateStartEvent(const RotateEvent& event)
bool UISwipeView::OnRotateEndEvent(const RotateEvent& event) bool UISwipeView::OnRotateEndEvent(const RotateEvent& event)
{ {
isRotating_ = false;
uint8_t dir; uint8_t dir;
if (direction_ == HORIZONTAL) { if (direction_ == HORIZONTAL) {
dir = (lastRotateLen_ >= 0) ? DragEvent::DIRECTION_LEFT_TO_RIGHT : DragEvent::DIRECTION_RIGHT_TO_LEFT; dir = (lastRotateLen_ >= 0) ? DragEvent::DIRECTION_LEFT_TO_RIGHT : DragEvent::DIRECTION_RIGHT_TO_LEFT;
...@@ -216,6 +215,7 @@ bool UISwipeView::OnRotateEndEvent(const RotateEvent& event) ...@@ -216,6 +215,7 @@ bool UISwipeView::OnRotateEndEvent(const RotateEvent& event)
} }
SwitchToPage(curIndex_); SwitchToPage(curIndex_);
lastRotateLen_ = 0; lastRotateLen_ = 0;
isRotating_ = false;
return UIView::OnRotateEndEvent(event); return UIView::OnRotateEndEvent(event);
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册