diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2011-03-15 02:45:13 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:13:35 +0300 |
commit | b8f6f73964aee38700eac8053ac9c9811ed2e06b (patch) | |
tree | 0cc5016cb7a05e485e47ee97e4a184bdf84d78ab /map/navigator.hpp | |
parent | 90a1c8a23e7c780aa5701c5f29e3cc2c633b15bd (diff) |
limiting max and min global rect.
Diffstat (limited to 'map/navigator.hpp')
-rw-r--r-- | map/navigator.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/map/navigator.hpp b/map/navigator.hpp index 9d57ea810a..c62abc7b1e 100644 --- a/map/navigator.hpp +++ b/map/navigator.hpp @@ -17,6 +17,7 @@ public: Navigator(); explicit Navigator(ScreenBase const & screen); + void SetMinScreenParams(unsigned pxMinWidth, double metresMinWidth); void SetFromRect(m2::RectD const & r); void CenterViewport(m2::PointD const & p); @@ -60,6 +61,13 @@ public: private: + + + unsigned m_pxMinWidth; + double m_metresMinWidth; + bool CheckMinScale(ScreenBase const & screen); + bool CheckMaxScale(ScreenBase const & screen); + // Internal screen corresponding to the state when navigation began with StartDrag or StartScale. ScreenBase m_StartScreen; // Internal screen to do GtoP() and PtoG() calculations. It is always up to date with navigation. @@ -85,7 +93,7 @@ private: // Device orientation EOrientation m_orientation; // Used in DoScale and ScaleByPoint - void ScaleImpl(m2::PointD const & newPt1, m2::PointD const & newPt2, m2::PointD const & oldPt1, m2::PointD const & oldPt2); + void ScaleImpl(m2::PointD const & newPt1, m2::PointD const & newPt2, m2::PointD const & oldPt1, m2::PointD const & oldPt2, bool skipMaxScaleCheck); }; #include "../base/stop_mem_debug.hpp" |