Skip to content

Commit

Permalink
DBC22-2052: reset cam index to clear state
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrel-oxd authored and ray-oxd committed Apr 30, 2024
1 parent 112259a commit 41596bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frontend/src/Components/map/camPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ export default function CamPopup(props) {
const newCam = camFeature.id ? camFeature : camFeature.getProperties();
setRootCam(newCam);
setCamera(newCam);
setCamIndex(0);
}, [camFeature]);

useEffect(() => {
if (isInitialMount.current) {
isInitialMount.current = false;
return;
}

setCamera(rootCam.camGroup[camIndex]);
}, [camIndex]);

Expand Down

0 comments on commit 41596bb

Please sign in to comment.