taking visualScale into account when hitTest'ing the CompassArrow.

This commit is contained in:
rachytski 2012-08-27 13:34:33 +03:00 committed by Alex Zolotarev
parent 4f93b029f9
commit 25698b84a2

View file

@ -170,5 +170,6 @@ bool CompassArrow::onTapEnded(m2::PointD const & pt)
bool CompassArrow::hitTest(m2::PointD const & pt) const
{
return pt.Length(pivot() * visualScale()) < max(m_arrowWidth / 2, m_arrowHeight / 2);
double rad = max(m_arrowWidth / 2, m_arrowHeight / 2);
return pt.Length(pivot() * visualScale()) < rad * visualScale();
}