| 587 | } |
| 588 | |
| 589 | bool UserEventStream::InterruptFollowAnimations(bool force) |
| 590 | { |
| 591 | Animation const * followAnim = m_animationSystem.FindAnimation<MapFollowAnimation>(Animation::Type::MapFollow); |
| 592 | |
| 593 | if (followAnim == nullptr) |
| 594 | followAnim = |
| 595 | m_animationSystem.FindAnimation<SequenceAnimation>(Animation::Type::Sequence, kPrettyFollowAnim.c_str()); |
| 596 | |
| 597 | if (followAnim == nullptr) |
| 598 | followAnim = |
| 599 | m_animationSystem.FindAnimation<ParallelAnimation>(Animation::Type::Parallel, kParallelFollowAnim.c_str()); |
| 600 | |
| 601 | if (followAnim == nullptr) |
| 602 | followAnim = |
| 603 | m_animationSystem.FindAnimation<ParallelAnimation>(Animation::Type::Parallel, kParallelLinearAnim.c_str()); |
| 604 | |
| 605 | if (followAnim != nullptr) |
| 606 | { |
| 607 | if (force || followAnim->CouldBeInterrupted()) |
| 608 | ResetAnimations(followAnim->GetType(), followAnim->GetCustomType(), !followAnim->CouldBeInterrupted()); |
| 609 | else |
| 610 | return false; |
| 611 | } |
| 612 | return true; |
| 613 | } |
| 614 | |
| 615 | bool UserEventStream::SetFollowAndRotate(m2::PointD const & userPos, m2::PointD const & pixelPos, double azimuth, |
| 616 | int preferredZoomLevel, double autoScale, bool isAnim, bool isAutoScale, |
nothing calls this directly
no test coverage detected