MCPcopy Create free account
hub / github.com/comaps/comaps / InterruptFollowAnimations

Method InterruptFollowAnimations

libs/drape_frontend/user_event_stream.cpp:589–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587}
588
589bool 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
615bool UserEventStream::SetFollowAndRotate(m2::PointD const & userPos, m2::PointD const & pixelPos, double azimuth,
616 int preferredZoomLevel, double autoScale, bool isAnim, bool isAutoScale,

Callers

nothing calls this directly

Calls 3

CouldBeInterruptedMethod · 0.80
GetTypeMethod · 0.45
GetCustomTypeMethod · 0.45

Tested by

no test coverage detected