forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
ffb32f2f1e
commit
ada639df3c
5 changed files with 12 additions and 12 deletions
|
@ -3,10 +3,10 @@
|
|||
namespace df
|
||||
{
|
||||
|
||||
ArrowAnimation::ArrowAnimation(m2::PointD const & startPos, m2::PointD const & endPos,
|
||||
double startAngle, double endAngle, ScreenBase const & convertor)
|
||||
ArrowAnimation::ArrowAnimation(m2::PointD const & startPos, m2::PointD const & endPos, double moveDuration,
|
||||
double startAngle, double endAngle)
|
||||
: Animation(true /* couldBeInterrupted */, true /* couldBeBlended */)
|
||||
, m_positionInterpolator(startPos, endPos, convertor)
|
||||
, m_positionInterpolator(moveDuration, 0.0 /* delay */, startPos, endPos)
|
||||
, m_angleInterpolator(startAngle, endAngle)
|
||||
{
|
||||
m_objects.insert(Animation::MyPositionArrow);
|
||||
|
|
|
@ -9,8 +9,8 @@ namespace df
|
|||
class ArrowAnimation : public Animation
|
||||
{
|
||||
public:
|
||||
ArrowAnimation(m2::PointD const & startPos, m2::PointD const & endPos,
|
||||
double startAngle, double endAngle, ScreenBase const & convertor);
|
||||
ArrowAnimation(m2::PointD const & startPos, m2::PointD const & endPos, double moveDuration,
|
||||
double startAngle, double endAngle);
|
||||
|
||||
Animation::Type GetType() const override { return Animation::Arrow; }
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace df
|
|||
|
||||
double CalcAnimSpeedDuration(double pxDiff, double pxSpeed)
|
||||
{
|
||||
double const kEps = 1e-5;
|
||||
double constexpr kEps = 1e-5;
|
||||
|
||||
if (my::AlmostEqualAbs(pxDiff, 0.0, kEps))
|
||||
return 0.0;
|
||||
|
|
|
@ -9,7 +9,7 @@ class Interpolator
|
|||
{
|
||||
public:
|
||||
Interpolator(double duration, double delay = 0);
|
||||
virtual ~Interpolator(){}
|
||||
virtual ~Interpolator() = default;
|
||||
|
||||
virtual void Advance(double elapsedSeconds);
|
||||
virtual void Finish();
|
||||
|
|
|
@ -630,10 +630,10 @@ void MyPositionController::CreateAnim(m2::PointD const & oldPos, double oldAzimu
|
|||
{
|
||||
if (IsModeChangeViewport())
|
||||
{
|
||||
m_animCreator = [this, oldPos, oldAzimut, screen]()
|
||||
m_animCreator = [this, oldPos, oldAzimut, moveDuration]()
|
||||
{
|
||||
AnimationSystem::Instance().CombineAnimation(make_unique_dp<ArrowAnimation>(oldPos, m_position, oldAzimut,
|
||||
m_drawDirection, screen));
|
||||
AnimationSystem::Instance().CombineAnimation(make_unique_dp<ArrowAnimation>(oldPos, m_position, moveDuration,
|
||||
oldAzimut, m_drawDirection));
|
||||
};
|
||||
m_oldPosition = oldPos;
|
||||
m_oldDrawDirection = oldAzimut;
|
||||
|
@ -641,8 +641,8 @@ void MyPositionController::CreateAnim(m2::PointD const & oldPos, double oldAzimu
|
|||
}
|
||||
else
|
||||
{
|
||||
AnimationSystem::Instance().CombineAnimation(make_unique_dp<ArrowAnimation>(oldPos, m_position, oldAzimut,
|
||||
m_drawDirection, screen));
|
||||
AnimationSystem::Instance().CombineAnimation(make_unique_dp<ArrowAnimation>(oldPos, m_position, moveDuration,
|
||||
oldAzimut, m_drawDirection));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue