Browse Source

Popups: move close button into the content, so that position depends on existance of scrollbar

master
parent
commit
5ed90fff83
  1. 3
      src/CategoryOverpass.js
  2. 7
      style.css

3
src/CategoryOverpass.js

@ -133,6 +133,9 @@ function CategoryOverpass (options, data, repository) {
this.updatePopupContent(ob, ob.popup)
// Move close button into the content, to make its position depending whether a scrollbar is visible or not
ob.popup._contentNode.insertBefore(ob.popup._closeButton, ob.popup._contentNode.firstChild)
if (document.getElementById('content').className === 'details open') {
showDetails(ob, this)
}

7
style.css

@ -597,3 +597,10 @@ ul.overpass-layer-list > li > a > .content > .details {
background-size: 100% 20px, 100% 20px, 100% 10px, 100% 10px;
background-attachment:local, local, scroll, scroll;
}
.leaflet-popup > .leaflet-popup-close-button {
display: none;
}
.leaflet-container .leaflet-popup-content > a.leaflet-popup-close-button {
float: right;
position: inherit;
}
Loading…
Cancel
Save