mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
[drape] Fixes add business button crosshair placement
-Point crosshair to optionalPosition instead of a random point in BoundArea Signed-off-by: hemanggs <hemangmanhas@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
460a7fa480
commit
b195059fb6
@@ -619,7 +619,7 @@ public class PlacePageView extends Fragment
|
|||||||
|
|
||||||
private void addOrganisation()
|
private void addOrganisation()
|
||||||
{
|
{
|
||||||
((MwmActivity) requireActivity()).showPositionChooserForEditor(true, false);
|
((MwmActivity) requireActivity()).showPositionChooserForEditor(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addPlace()
|
private void addPlace()
|
||||||
|
|||||||
@@ -839,22 +839,20 @@ void FrontendRenderer::AcceptMessage(ref_ptr<Message> message)
|
|||||||
m_dragBoundArea = msg->AcceptBoundArea();
|
m_dragBoundArea = msg->AcceptBoundArea();
|
||||||
if (msg->IsEnabled())
|
if (msg->IsEnabled())
|
||||||
{
|
{
|
||||||
if (!m_dragBoundArea.empty())
|
auto const pt = msg->GetOptionalPosition();
|
||||||
|
if (pt || m_dragBoundArea.empty())
|
||||||
{
|
{
|
||||||
PullToBoundArea(true /* randomPlace */, true /* applyZoom */);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Exact position for POI or screen's center for Add place on map.
|
|
||||||
int zoom = kDoNotChangeZoom;
|
int zoom = kDoNotChangeZoom;
|
||||||
if (GetCurrentZoom() < scales::GetAddNewPlaceScale())
|
if (GetCurrentZoom() < scales::GetAddNewPlaceScale())
|
||||||
zoom = scales::GetAddNewPlaceScale();
|
zoom = scales::GetAddNewPlaceScale();
|
||||||
|
|
||||||
auto const pt = msg->GetOptionalPosition();
|
|
||||||
AddUserEvent(make_unique_dp<SetCenterEvent>(pt ? *pt : m_userEventStream.GetCurrentScreen().GlobalRect().Center(),
|
AddUserEvent(make_unique_dp<SetCenterEvent>(pt ? *pt : m_userEventStream.GetCurrentScreen().GlobalRect().Center(),
|
||||||
zoom, true /* isAnim */, false /* trackVisibleViewport */,
|
zoom, true /* isAnim */, false /* trackVisibleViewport */,
|
||||||
nullptr /* parallelAnimCreator */));
|
nullptr /* parallelAnimCreator */));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PullToBoundArea(true /* randomPlace */, true /* applyZoom */);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user