Skip to content

Commit

Permalink
Fixed Geosearch Bar and Removed Duplicate Code (#1303)
Browse files Browse the repository at this point in the history
* reversal of unintended changes

* updated select.html

* reverted to previous state

* revert ExportAction.js

* rebuild to resolve conflict

* update listeners.html

* fix more indentation issues

* placeholder update

* updated to support restoring welcomemodal

* rename id on welcomemodal

* update

* removed makeshift commenting

* removed duplicate code in archive.js

* fixed issue on geosearch bar

Co-authored-by: Jeffrey Warren <[email protected]>
  • Loading branch information
segun-codes and jywarren authored Dec 19, 2022
1 parent 6a792bf commit 4235213
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/js/archive.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
let map;
const welcomeModal = document.getElementById('welcomeModal');
const tileMap = document.getElementById('map');
const restoreWelcomeModal = document.getElementById('restoreWelcomeModalBtn');
const sidebar = document.getElementById('offcanvasRight');
const form = document.getElementById('form');
Expand Down Expand Up @@ -113,14 +114,14 @@ restoreWelcomeModal.addEventListener('click', (event) => {
input.value='';
});

map.addEventListener('click', (event) => {
sidebar.classList.remove('show');
});

mapToggle.addEventListener('click', (event) => {
new bootstrap.Offcanvas(sidebar).show();
});

tileMap.addEventListener('click', (event) => {
bootstrap.Offcanvas.getInstance(sidebar).hide();
});

document.addEventListener('click', (event) => {
if (event.target.classList.contains('place-button')) {
const imageURL = event.target.previousElementSibling.src;
Expand Down

0 comments on commit 4235213

Please sign in to comment.