Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrachytski <siarhei.rachytski@gmail.com>2012-08-27 14:34:33 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:42:36 +0300
commit25698b84a221483b2cb103da4d637764500dde48 (patch)
tree0c033ae4c22707a7c3f4ee16ad052b4e8e8a9527 /map/compass_arrow.cpp
parent4f93b029f9e6cc9ddc691a60a4c88a1b0fec3151 (diff)
taking visualScale into account when hitTest'ing the CompassArrow.
Diffstat (limited to 'map/compass_arrow.cpp')
-rw-r--r--map/compass_arrow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/map/compass_arrow.cpp b/map/compass_arrow.cpp
index 652a8a995e..3463fd15bc 100644
--- a/map/compass_arrow.cpp
+++ b/map/compass_arrow.cpp
@@ -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();
}