diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/leaflet-soton.css | 2 | ||||
-rw-r--r-- | src/leaflet-soton.js | 27 |
2 files changed, 15 insertions, 14 deletions
diff --git a/src/leaflet-soton.css b/src/leaflet-soton.css index 7a02f50..f529f60 100644 --- a/src/leaflet-soton.css +++ b/src/leaflet-soton.css @@ -13,7 +13,7 @@ } .ls-popup-uri { - float: right; + text-align: right; text-decoration: none; } diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js index f2e4e5b..3b05f2d 100644 --- a/src/leaflet-soton.js +++ b/src/leaflet-soton.js @@ -994,14 +994,14 @@ SELECT * WHERE {\ var map = this; options = options || {}; - options.maxWidth = map.getContainer().offsetWidth*0.9; + options.maxWidth = map.getContainer().offsetWidth*0.7; options.minWidth = 320; if (options.minWidth > options.maxWidth) { options.minWidth = options.maxWidth; } - options.maxHeight = map.getContainer().offsetHeight*0.8; + options.maxHeight = map.getContainer().offsetHeight*0.6; map.closeInfo(); @@ -1518,17 +1518,7 @@ SELECT * WHERE {\ } function getTemplateWrapper(properties, contentFunction) { - var documentFragment = new DocumentFragment(); - - if ('uri' in properties) { - var link = document.createElement('a'); - link.setAttribute('href', properties.uri); - link.setAttribute('target', '_blank'); - link.className = 'ls-popup-uri'; - link.textContent = "(Full Information)"; - - documentFragment.appendChild(link); - } + var documentFragment = document.createDocumentFragment(); var title = document.createElement('h2'); title.classList.add("ls-popup-title"); @@ -1551,6 +1541,17 @@ SELECT * WHERE {\ title.appendChild( span ); } + if ('uri' in properties) { + var link = document.createElement('a'); + link.setAttribute('href', properties.uri); + link.setAttribute('target', '_blank'); + link.className = 'ls-popup-uri'; + link.textContent = "(Full Information)"; + + documentFragment.appendChild(link); + } + + var div_inner = document.createElement("div"); div_inner.classList.add("ls-popup-content"); contentFunction(div_inner); |