Skip to content

Commit 6ac0f5d

Browse files
committed
DBC22-6162: fixed map operations not working when tabbed out
1 parent abe3828 commit 6ac0f5d

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/frontend/src/pages/CameraDetailsPage.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ export default function CameraDetailsPage() {
840840
<Tabs
841841
className="mobile-tabs"
842842
activeKey={activeTab}
843+
transition={false}
843844
onSelect={selectedTab => setActiveTab(selectedTab)}>
844845
<Tab
845846
eventKey="webcam"
@@ -1071,6 +1072,7 @@ export default function CameraDetailsPage() {
10711072
</Tab>
10721073
<Tab
10731074
eventKey="nearby"
1075+
className="nearby-tab"
10741076
title={
10751077
!largeScreen && (
10761078
<span>

src/frontend/src/pages/CameraDetailsPage.scss

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@
965965
bottom: 2.5rem;
966966
right: 0.5rem;
967967
}
968-
968+
969969
.ol-attribution.attribution-control {
970970
bottom: 0.5rem;
971971
left: 0.5rem;
@@ -1031,6 +1031,21 @@
10311031
.camera-imagery__nearby {
10321032
margin-top: 2px;
10331033
}
1034+
1035+
// Keep the map tab pane rendered even when tab not active
1036+
> .tab-pane.nearby-tab:not(.active) {
1037+
display: block !important;
1038+
position: fixed;
1039+
left: 0;
1040+
top: 0;
1041+
transform: translateX(-100%);
1042+
width: 100%;
1043+
height: calc(100vh - 470px);
1044+
min-height: 388px;
1045+
visibility: hidden;
1046+
pointer-events: none;
1047+
z-index: -1;
1048+
}
10341049
}
10351050
.loader-container {
10361051
display: flex;

0 commit comments

Comments
 (0)