mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 21:33:59 +00:00
[Drape] Adjust compass hidden angle to match removed screen angle snapping
The screen snapping was removed a while ago (https://github.com/organicmaps/organicmaps/pull/8838) but the compass is still hidden within 5° of north. This adjusts the angle to 0.1 degrees off north, which should be enough. fixes #1097 Signed-off-by: Harry Bond <me@hbond.xyz>
This commit is contained in:
@@ -48,8 +48,9 @@ public:
|
|||||||
|
|
||||||
bool Update(ScreenBase const & screen) override
|
bool Update(ScreenBase const & screen) override
|
||||||
{
|
{
|
||||||
static double const kVisibleStartAngle = math::DegToRad(5.0);
|
static double const kVisibleTolerance = 0.1;
|
||||||
static double const kVisibleEndAngle = math::DegToRad(355.0);
|
static double const kVisibleStartAngle = math::DegToRad(0.0 + kVisibleTolerance);
|
||||||
|
static double const kVisibleEndAngle = math::DegToRad(360.0 - kVisibleTolerance);
|
||||||
|
|
||||||
auto const angle = static_cast<float>(ang::AngleIn2PI(screen.GetAngle()));
|
auto const angle = static_cast<float>(ang::AngleIn2PI(screen.GetAngle()));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user