diff options
author | Christopher Baines <cb15g11@soton.ac.uk> | 2014-09-20 16:09:20 +0100 |
---|---|---|
committer | Christopher Baines <cb15g11@soton.ac.uk> | 2014-09-20 16:09:20 +0100 |
commit | cc19c592b3c5ed7dc814e427ce990235d27d2ff5 (patch) | |
tree | 6b98ac70563db89e51036e52c3a25fae2dca08ca | |
parent | 87cbe3dcd4159c6ddbc76a8be27c0b989d70dc76 (diff) | |
download | leaflet-soton-cc19c592b3c5ed7dc814e427ce990235d27d2ff5.tar leaflet-soton-cc19c592b3c5ed7dc814e427ce990235d27d2ff5.tar.gz |
Prevent popups from being larger than the map
This helps on smaller devices.
-rw-r--r-- | src/leaflet-soton.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js index 65e8e6e..85a322b 100644 --- a/src/leaflet-soton.js +++ b/src/leaflet-soton.js @@ -994,7 +994,12 @@ SELECT * WHERE {\ options.maxWidth = map.getContainer().offsetWidth*0.9; options.minWidth = 320; - //options.maxHeight = map.getContainer().offsetHeight*0.8; + + if (options.minWidth > options.maxWidth) { + options.minWidth = options.maxWidth; + } + + options.maxHeight = map.getContainer().offsetHeight*0.8; map.closeInfo(); |