From 6708f691e29313e08f47ef84210635efd764d7ef Mon Sep 17 00:00:00 2001 From: crschmidt Date: Wed, 18 Mar 2009 15:47:37 +0000 Subject: [PATCH] in situations where a framed popup has a minSize set which isn't big enough to hold all the blocks, it is possible that the popup will throw an error. Though this is a configuration error, it is unlikely to be run across in typical development, so we'll be nice to the user and protect them from this mistake. (Closes #1891) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9085 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Popup/Framed.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Popup/Framed.js b/lib/OpenLayers/Popup/Framed.js index d04a781b38..df0891f3b7 100644 --- a/lib/OpenLayers/Popup/Framed.js +++ b/lib/OpenLayers/Popup/Framed.js @@ -321,8 +321,8 @@ OpenLayers.Popup.Framed = var h = (isNaN(positionBlock.size.h)) ? this.size.h - (b + t) : positionBlock.size.h; - block.div.style.width = w + 'px'; - block.div.style.height = h + 'px'; + block.div.style.width = (w < 0 ? 0 : w) + 'px'; + block.div.style.height = (h < 0 ? 0 : h) + 'px'; block.div.style.left = (l != null) ? l + 'px' : ''; block.div.style.bottom = (b != null) ? b + 'px' : '';