diff options
| author | Samarth-Agarwal1 <agarwalsamarth@hotmail.com> | 2019-03-27 03:31:36 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-27 03:31:36 +0000 |
| commit | 337d5e8d948797077b9683e8c5617af48473f3a5 (patch) | |
| tree | 3847d8b8eedb37d2706ba78a6924133407aca419 /web/public | |
| parent | e25574cb1c6820948d3050d450bb172d91d29e64 (diff) | |
Revert "Feat/30"revert-45-feat/30
Diffstat (limited to 'web/public')
| -rw-r--r-- | web/public/assets/blue-icon.png | bin | 2586 -> 0 bytes | |||
| -rw-r--r-- | web/public/assets/orange-icon.png | bin | 7382 -> 0 bytes | |||
| -rw-r--r-- | web/public/javascripts/map.js | 24 | ||||
| -rw-r--r-- | web/public/stylesheets/style.css | 29 |
4 files changed, 10 insertions, 43 deletions
diff --git a/web/public/assets/blue-icon.png b/web/public/assets/blue-icon.png Binary files differdeleted file mode 100644 index e4abba3..0000000 --- a/web/public/assets/blue-icon.png +++ /dev/null diff --git a/web/public/assets/orange-icon.png b/web/public/assets/orange-icon.png Binary files differdeleted file mode 100644 index dd725de..0000000 --- a/web/public/assets/orange-icon.png +++ /dev/null diff --git a/web/public/javascripts/map.js b/web/public/javascripts/map.js index 544da9e..8d4fc3b 100644 --- a/web/public/javascripts/map.js +++ b/web/public/javascripts/map.js @@ -2,7 +2,6 @@ // L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { // attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' // }).addTo(map); -let currPoint; const Races = { "White" : "European or White", @@ -32,8 +31,7 @@ function plotPointsOnMap(points) { function showDetails(e) { // layer.feature.geometry gives you access to all the fields let layer = e.layer; - currPoint = layer; - + let sideBar = document.getElementById('sidebar'); if (getComputedStyle(sideBar).visibility === 'hidden') { @@ -82,27 +80,13 @@ function showDetails(e) { let extraText = document.createTextNode(layer.feature.geometry['extra']); extraTextSpan.appendChild(extraText); - let pendingBtn = document.getElementById('pending-btn'); - pendingBtn.addEventListener('click', markAsPending); - - let completedBtn = document.getElementById('completed-btn'); - completedBtn.addEventListener('click', markAsCompleted); - - let closeBtn = document.getElementById('close-btn'); - closeBtn.addEventListener('click', closeDetails); -} - -function markAsPending(e) { - currPoint._icon.src = '../assets/orange-icon.png'; -} - -function markAsCompleted(e) { - map.removeLayer(currPoint); + let closeBtn = document.getElementById('close-btn') + closeBtn.addEventListener('click', closeDetails) } function closeDetails(e) { let details = document.getElementById('sidebar') - details.style.visibility = 'hidden'; + details.style.visibility = 'hidden' } // different basemap diff --git a/web/public/stylesheets/style.css b/web/public/stylesheets/style.css index 5f39fcf..ece8da4 100644 --- a/web/public/stylesheets/style.css +++ b/web/public/stylesheets/style.css @@ -64,37 +64,20 @@ a { overflow-wrap: break-word; word-wrap: break-word; } -#btn-container { +#close-btn-container { height: 30px; top: 250px; background-color: lightgrey; width: 350px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; - text-align: center; -} -.details-btn { - position: relative; - margin-top: 4px; - margin-bottom: 4px; - border-radius: 10px; - font-size: 18px; - padding: 10px; -} -#pending-btn { - background-color: orange; - float: left; - margin-left: 10px; -} - -#completed-btn { - background-color: #2bbd2b; - float: left; - margin-left: 10px; } - #close-btn { background-color: red; + position: relative; + margin-top: 4px; float: right; - margin-right: 10px; + margin-right: 20px; + border-radius: 10px; + width: 100px; } |
