From 728c40e0cfdbcb2b3ba1401f9c74a3e43e64ea30 Mon Sep 17 00:00:00 2001
From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com>
Date: Thu, 1 Aug 2024 10:57:15 -0400
Subject: [PATCH] Fix issue with View Details button not opening the inspector
---
js/mapController.js | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/js/mapController.js b/js/mapController.js
index afa8d92..13f9de4 100644
--- a/js/mapController.js
+++ b/js/mapController.js
@@ -1635,7 +1635,7 @@ function didClickMap(e) {
let html = "";
if (tags.name) html += "" + tags.name + "
"
- html += 'View Details';
+ html += 'View Details';
activePopup = new maplibregl.Popup({
className: 'quickinfo',
@@ -1644,14 +1644,10 @@ function didClickMap(e) {
.setLngLat(coordinates)
.setHTML(html)
.addTo(map);
-
- document.getElementById("view-feature-details").addEventListener('click', function(e) {
- e.preventDefault();
- openSidebar();
- });
}
-function didClickViewDetails(e) {
- e.preventDefault();
+function didClickViewDetails() {
+ openSidebar();
+ return false;
}
function didDoubleClickMap(e) {
let entity = entityForEvent(e, ['major-trail-pois']);