From cc19c592b3c5ed7dc814e427ce990235d27d2ff5 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 20 Sep 2014 16:09:20 +0100 Subject: Prevent popups from being larger than the map This helps on smaller devices. --- src/leaflet-soton.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3