mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 22:23:44 +00:00
[drape] Allow controlling viewport restoration on DeactivateMapSelection
Signed-off-by: hemanggs <hemangmanhas@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
fc199252eb
commit
90492e95e6
@@ -767,9 +767,16 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
private void showPositionChooser(ChoosePositionMode mode, boolean isBusiness, boolean applyPosition)
|
||||
{
|
||||
closeFloatingToolbarsAndPanels(false);
|
||||
int width = mMapFragment.getView().getWidth();
|
||||
int height = mMapFragment.getView().getHeight();
|
||||
Framework.nativeSetVisibleRect(0, 0, width, height);
|
||||
if (mMapFragment != null)
|
||||
{
|
||||
final View mapView = mMapFragment.getView();
|
||||
if (mapView != null)
|
||||
{
|
||||
int width = mapView.getWidth();
|
||||
int height = mapView.getHeight();
|
||||
Framework.nativeSetVisibleRect(0, 0, width, height);
|
||||
}
|
||||
}
|
||||
UiUtils.show(mPointChooser);
|
||||
mMapButtonsViewModel.setButtonsHidden(true);
|
||||
ChoosePositionMode.set(mode, isBusiness, applyPosition);
|
||||
|
||||
@@ -287,7 +287,7 @@ public class PlaceScreen extends BaseMapScreen implements OnBackPressedCallback.
|
||||
@Override
|
||||
public void onBuiltRoute()
|
||||
{
|
||||
Framework.nativeDeactivateMapSelectionCircle();
|
||||
Framework.nativeDeactivateMapSelectionCircle(true);
|
||||
mMapObject = mRoutingController.getEndPoint();
|
||||
invalidate();
|
||||
}
|
||||
@@ -295,7 +295,7 @@ public class PlaceScreen extends BaseMapScreen implements OnBackPressedCallback.
|
||||
@Override
|
||||
public void onPlanningCancelled()
|
||||
{
|
||||
Framework.nativeDeactivateMapSelectionCircle();
|
||||
Framework.nativeDeactivateMapSelectionCircle(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -163,7 +163,7 @@ public class Framework
|
||||
public static native @Nullable String nativeGetParsedBackUrl();
|
||||
|
||||
public static native void nativeDeactivatePopup();
|
||||
public static native void nativeDeactivateMapSelectionCircle();
|
||||
public static native void nativeDeactivateMapSelectionCircle(boolean restoreViewport);
|
||||
|
||||
public static native String nativeGetDataFileExt();
|
||||
|
||||
|
||||
@@ -225,10 +225,9 @@ public class PlacePageController
|
||||
|
||||
private void onHiddenInternal()
|
||||
{
|
||||
if (ChoosePositionMode.get() == ChoosePositionMode.None) {
|
||||
if (ChoosePositionMode.get() == ChoosePositionMode.None)
|
||||
Framework.nativeDeactivatePopup();
|
||||
}
|
||||
Framework.nativeDeactivateMapSelectionCircle();
|
||||
Framework.nativeDeactivateMapSelectionCircle(false);
|
||||
PlacePageUtils.updateMapViewport(mCoordinator, mDistanceToTop, mViewportMinHeight);
|
||||
resetPlacePageHeightBounds();
|
||||
removePlacePageFragments();
|
||||
|
||||
Reference in New Issue
Block a user