| 859 | } |
| 860 | |
| 861 | void MyPositionController::CreateAnim(m2::PointD const & oldPos, double oldAzimut, ScreenBase const & screen) |
| 862 | { |
| 863 | double const moveDuration = PositionInterpolator::GetMoveDuration(oldPos, m_position, screen); |
| 864 | double const rotateDuration = AngleInterpolator::GetRotateDuration(oldAzimut, m_drawDirection); |
| 865 | if (df::IsAnimationAllowed(std::max(moveDuration, rotateDuration), screen)) |
| 866 | { |
| 867 | if (IsModeChangeViewport()) |
| 868 | { |
| 869 | m_animCreator = [this, moveDuration](ref_ptr<Animation> syncAnim) -> drape_ptr<Animation> |
| 870 | { |
| 871 | drape_ptr<Animation> anim = make_unique_dp<ArrowAnimation>( |
| 872 | GetDrawablePosition(), m_position, syncAnim == nullptr ? moveDuration : syncAnim->GetDuration(), |
| 873 | GetDrawableAzimut(), m_drawDirection); |
| 874 | if (syncAnim != nullptr) |
| 875 | { |
| 876 | anim->SetMaxDuration(syncAnim->GetMaxDuration()); |
| 877 | anim->SetMinDuration(syncAnim->GetMinDuration()); |
| 878 | } |
| 879 | return anim; |
| 880 | }; |
| 881 | m_oldPosition = oldPos; |
| 882 | m_oldDrawDirection = oldAzimut; |
| 883 | m_isPendingAnimation = true; |
| 884 | } |
| 885 | else |
| 886 | { |
| 887 | AnimationSystem::Instance().CombineAnimation( |
| 888 | make_unique_dp<ArrowAnimation>(oldPos, m_position, moveDuration, oldAzimut, m_drawDirection)); |
| 889 | } |
| 890 | } |
| 891 | } |
| 892 | |
| 893 | void MyPositionController::EnablePerspectiveInRouting(bool enablePerspective) |
| 894 | { |
nothing calls this directly
no test coverage detected