summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Gutteridge <cjg@ecs.soton.ac.uk>2014-09-22 14:50:06 +0100
committerChristopher Gutteridge <cjg@ecs.soton.ac.uk>2014-09-22 14:50:06 +0100
commitec975602f5e49dc1d06eb82e0cf2fffde122c659 (patch)
treecb1b74a3a2905eb3003708fbcdfb92a21069c928 /src
parentc6ff306ad0baee579319c090e4ad3aeee595b384 (diff)
downloadleaflet-soton-ec975602f5e49dc1d06eb82e0cf2fffde122c659.tar
leaflet-soton-ec975602f5e49dc1d06eb82e0cf2fffde122c659.tar.gz
shrunk poups a little more and moved fullinfo link
Diffstat (limited to 'src')
-rw-r--r--src/leaflet-soton.css2
-rw-r--r--src/leaflet-soton.js27
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);