Skip to content

Commit cd5b1c9

Browse files
committed
fix "Show Other Images" behavior on image detail page
1 parent 00173b0 commit cd5b1c9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

assets/js/components/map_display.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,16 @@ export function initializeMap(config) {
789789
if (layerControl) {
790790
layerControl.applyImageLayerVisibility();
791791
}
792+
793+
// When "Show Other Images" toggle controls visibility, re-hide layers
794+
// unless the toggle checkbox is currently checked (applyImageLayerVisibility
795+
// above doesn't know about the toggle and would make them visible).
796+
if (showOtherImages && imageId) {
797+
const toggle = document.getElementById("show-other-images-toggle");
798+
if (!toggle || !toggle.checked) {
799+
window.toggleOtherImages(false);
800+
}
801+
}
792802
}
793803

794804
// Map load handler

0 commit comments

Comments
 (0)