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
This commit is contained in:
crschmidt
2009-03-18 15:47:37 +00:00
parent 2c177fc85c
commit 6708f691e2

View File

@@ -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' : '';