forked from organicmaps/organicmaps-tmp
Fixed zoom changing on add business
This commit is contained in:
parent
6d674553e8
commit
0c7c5c7541
4 changed files with 7 additions and 6 deletions
|
@ -927,7 +927,9 @@ void FrontendRenderer::PullToBoundArea(bool randomPlace, bool applyZoom)
|
|||
{
|
||||
m2::PointD const dest = randomPlace ? m2::GetRandomPointInsideTriangles(m_dragBoundArea) :
|
||||
m2::ProjectPointToTriangles(center, m_dragBoundArea);
|
||||
int const zoom = applyZoom ? scales::GetAddNewPlaceScale() : m_currentZoomLevel;
|
||||
int zoom = kDoNotChangeZoom;
|
||||
if (applyZoom && m_currentZoomLevel < scales::GetAddNewPlaceScale())
|
||||
zoom = scales::GetAddNewPlaceScale();
|
||||
AddUserEvent(SetCenterEvent(dest, zoom, true));
|
||||
}
|
||||
}
|
||||
|
@ -1609,7 +1611,7 @@ void FrontendRenderer::ChangeModelView(double azimuth)
|
|||
|
||||
void FrontendRenderer::ChangeModelView(m2::RectD const & rect)
|
||||
{
|
||||
AddUserEvent(SetRectEvent(rect, true, -1, true));
|
||||
AddUserEvent(SetRectEvent(rect, true, kDoNotChangeZoom, true));
|
||||
}
|
||||
|
||||
void FrontendRenderer::ChangeModelView(m2::PointD const & userPos, double azimuth,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "drape_frontend/animation_system.hpp"
|
||||
#include "drape_frontend/animation_utils.hpp"
|
||||
#include "drape_frontend/visual_params.hpp"
|
||||
#include "drape_frontend/user_event_stream.hpp"
|
||||
#include "drape_frontend/animation/base_interpolator.hpp"
|
||||
#include "drape_frontend/animation/interpolations.hpp"
|
||||
|
||||
|
@ -32,8 +33,6 @@ double const kMaxUpdateLocationInvervalSec = 30.0;
|
|||
int const kZoomThreshold = 10;
|
||||
int const kMaxScaleZoomLevel = 16;
|
||||
|
||||
int const kDoNotChangeZoom = -1;
|
||||
|
||||
string LocationModeStatisticsName(location::EMyPositionMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
|
|
|
@ -29,8 +29,6 @@ uint64_t const kKineticDelayMs = 500;
|
|||
|
||||
float const kForceTapThreshold = 0.75;
|
||||
|
||||
int const kDoNotChangeZoom = -1;
|
||||
|
||||
size_t GetValidTouchesCount(array<Touch, 2> const & touches)
|
||||
{
|
||||
size_t result = 0;
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
namespace df
|
||||
{
|
||||
|
||||
int const kDoNotChangeZoom = -1;
|
||||
|
||||
struct Touch
|
||||
{
|
||||
m2::PointF m_location = m2::PointF::Zero();
|
||||
|
|
Loading…
Add table
Reference in a new issue