From 9e7043cadbdddff1a5b830f89f764f76d22377a8 Mon Sep 17 00:00:00 2001 From: matthewjmckinley Date: Thu, 25 Jun 2026 15:56:36 -0700 Subject: [PATCH 1/3] Add sequence/step through mode to Geolocation ExhibitBuilder block --- .../exhibit_layouts/geolocation-map/form.php | 18 ++++++++ .../geolocation-map/layout.css | 17 +++++++ .../geolocation-map/layout.php | 44 +++++++++++++++++++ 3 files changed, 79 insertions(+) diff --git a/views/shared/exhibit_layouts/geolocation-map/form.php b/views/shared/exhibit_layouts/geolocation-map/form.php index c62defb..9daab47 100644 --- a/views/shared/exhibit_layouts/geolocation-map/form.php +++ b/views/shared/exhibit_layouts/geolocation-map/form.php @@ -1,4 +1,22 @@ +getFormStem(); +$options = $block->getOptions(); +?>

exhibitFormAttachments($block); ?>
+ +
+
+

+ +
+
+
+ formLabel($formStem . '[options][sequence]', __('Sequence mode')); ?> + formCheckbox($formStem . '[options][sequence]', @$options['sequence'], [], ['1', '0']); ?> +

+
+
+
diff --git a/views/shared/exhibit_layouts/geolocation-map/layout.css b/views/shared/exhibit_layouts/geolocation-map/layout.css index daf8e0d..6c3a249 100644 --- a/views/shared/exhibit_layouts/geolocation-map/layout.css +++ b/views/shared/exhibit_layouts/geolocation-map/layout.css @@ -2,3 +2,20 @@ width: 100%; height: 450px; } + +.layout-geolocation-map .geolocation-sequence-nav { + display: flex; + align-items: center; + gap: 0.5em; + margin-bottom: 0.5em; +} + +.layout-geolocation-map .geolocation-sequence-counter { + min-width: 4em; + text-align: center; +} + +.layout-geolocation-map .geolocation-sequence-nav button:disabled { + opacity: 0.4; + cursor: not-allowed; +} diff --git a/views/shared/exhibit_layouts/geolocation-map/layout.php b/views/shared/exhibit_layouts/geolocation-map/layout.php index 15be75f..f82a7bc 100644 --- a/views/shared/exhibit_layouts/geolocation-map/layout.php +++ b/views/shared/exhibit_layouts/geolocation-map/layout.php @@ -33,6 +33,7 @@ ]; endforeach; endforeach; +$sequenceMode = !empty($options['sequence']) && count($locations) > 0; ?> + +
+ + 1 / + +
+
From 1a5e3c3033a6a80e07564d6d77774ca5b1ee18de Mon Sep 17 00:00:00 2001 From: matthewjmckinley Date: Wed, 1 Jul 2026 15:04:20 -0700 Subject: [PATCH 2/3] Fine tune sequencing movement order and behavior --- .../exhibit_layouts/geolocation-map/layout.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/views/shared/exhibit_layouts/geolocation-map/layout.php b/views/shared/exhibit_layouts/geolocation-map/layout.php index f82a7bc..198fe63 100644 --- a/views/shared/exhibit_layouts/geolocation-map/layout.php +++ b/views/shared/exhibit_layouts/geolocation-map/layout.php @@ -54,18 +54,24 @@ var prevBtn = jQuery('#-prev'); var nextBtn = jQuery('#-next'); var counter = jQuery('#-counter'); + var pendingPopupOpen = null; function goToStep(index) { currentIndex = index; var layer = layers[currentIndex]; var geometry = JSON.parse(map_locations[currentIndex].geometry_json); + if (pendingPopupOpen) { + geolocation_map.map.off('moveend', pendingPopupOpen); + } + pendingPopupOpen = function () { + pendingPopupOpen = null; + layer.openPopup(); + }; + geolocation_map.map.once('moveend', pendingPopupOpen); if (geometry.type === 'Point') { geolocation_map.map.flyTo(layer.getLatLng()); } else { - geolocation_map.map.fitBounds(layer.getBounds(), {padding: [25, 25]}); + geolocation_map.map.flyToBounds(layer.getBounds(), {padding: [25, 25]}); } - geolocation_map.map.once('moveend', function () { - layer.openPopup(); - }); counter.text((currentIndex + 1) + ' / ' + total); prevBtn.prop('disabled', currentIndex === 0); nextBtn.prop('disabled', currentIndex === total - 1); From 2246ab4cf6bb1ab6da5992b13f1db0af343ad019 Mon Sep 17 00:00:00 2001 From: matthewjmckinley Date: Thu, 2 Jul 2026 11:22:28 -0700 Subject: [PATCH 3/3] Add multiple location item behavior to sequence mode helper text --- views/shared/exhibit_layouts/geolocation-map/form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/shared/exhibit_layouts/geolocation-map/form.php b/views/shared/exhibit_layouts/geolocation-map/form.php index 9daab47..aea3251 100644 --- a/views/shared/exhibit_layouts/geolocation-map/form.php +++ b/views/shared/exhibit_layouts/geolocation-map/form.php @@ -16,7 +16,7 @@
formLabel($formStem . '[options][sequence]', __('Sequence mode')); ?> formCheckbox($formStem . '[options][sequence]', @$options['sequence'], [], ['1', '0']); ?> -

+