From ec975602f5e49dc1d06eb82e0cf2fffde122c659 Mon Sep 17 00:00:00 2001 From: Christopher Gutteridge Date: Mon, 22 Sep 2014 14:50:06 +0100 Subject: shrunk poups a little more and moved fullinfo link --- src/leaflet-soton.css | 2 +- src/leaflet-soton.js | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'src') 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); -- cgit v1.2.3