Skip to content

Commit be292f8

Browse files
wmuldergovbcgov-brwang
authored andcommitted
DBC22-4915: Fix for orientation change issue
1 parent f445af4 commit be292f8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/frontend/src/Components/map/panels/CamPanel.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,14 @@ export default function CamPanel(props) {
7474
const newCam = camFeature.id ? camFeature : camFeature.getProperties();
7575
rootCamRef.current = newCam;
7676
setCamera(newCam);
77-
const params = new URLSearchParams(window.location.search);
78-
const savedCamIndex = params.get('camIndex') === null ? 0: params.get('camIndex');
79-
setCamIndex(savedCamIndex);
77+
78+
setCamIndex(0);
8079

8180
searchParams.set("type", 'camera');
8281
searchParams.set("id", newCam.id);
8382
searchParams.delete("display_category");
83+
searchParams.delete("camIndex");
84+
8485
setSearchParams(searchParams, { replace: true });
8586

8687
setIsUpdated(false);

0 commit comments

Comments
 (0)