Browse Source

Show details link

master
parent
commit
295db19ea0
  1. 4
      index.js
  2. 2
      src/CategoryOverpass.js
  3. 6
      style.css

4
index.js

@ -55,7 +55,7 @@ window.onload = function() {
var url = location.hash.substr(1)
options = {
showDetails: false
showDetails: !!location.hash.match(/\/details$/)
}
show(url, options, function () {})
@ -66,7 +66,7 @@ window.onload = function() {
var url = loc.substr(1)
options = {
showDetails: false
showDetails: !!loc.match(/\/details$/)
}
show(url, options, function () {})

2
src/CategoryOverpass.js

@ -10,6 +10,8 @@ function CategoryOverpass (id, data) {
data.id = this.id
data.feature.appUrl = '#' + this.id + '/{{ id }}'
data.feature.body = (typeof data.feature.body === 'string' ? data.feature.body : '') + '<a class="showDetails" href="#' + this.id + '/{{ id }}/details">show details</a>'
this.layer = new OverpassLayer(data)
}

6
style.css

@ -182,3 +182,9 @@ ul.overpass-layer-list > li:after {
width: 25px;
text-align: center;
}
#object a.showDetails {
display: none;
}
a.showDetails {
display: block;
}
Loading…
Cancel
Save