Skip to content

Commit

Permalink
Fix issue with View Details button not opening the inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Aug 1, 2024
1 parent a2a2162 commit 728c40e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions js/mapController.js
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,7 @@ function didClickMap(e) {
let html = "";

if (tags.name) html += "<b>" + tags.name + "</b><br/>"
html += '<a id="view-feature-details" href="" class="button">View Details</a>';
html += '<a href="" class="button" onclick="return didClickViewDetails()">View Details</a>';

activePopup = new maplibregl.Popup({
className: 'quickinfo',
Expand All @@ -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']);
Expand Down

0 comments on commit 728c40e

Please sign in to comment.