From e6ef35c17426f232c0857067a7e764b2b7f2b3cb Mon Sep 17 00:00:00 2001 From: crschmidt Date: Mon, 20 Nov 2006 01:11:21 +0000 Subject: [PATCH] Fix for #415 , reported by penyaskito, approved by Schuyler. Due to an oversight in my new setSize function didn't test setting size before popup was added to the map. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1935 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Popup/AnchoredBubble.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Popup/AnchoredBubble.js b/lib/OpenLayers/Popup/AnchoredBubble.js index 4fced7e180..495543cf28 100644 --- a/lib/OpenLayers/Popup/AnchoredBubble.js +++ b/lib/OpenLayers/Popup/AnchoredBubble.js @@ -70,10 +70,13 @@ OpenLayers.Popup.AnchoredBubble.prototype = contentSize.h -= (2 * this.padding); this.contentDiv.style.height = contentSize.h + "px"; + this.contentDiv.style.width = contentSize.w + "px"; - //size has changed - must redo corners - this.setRicoCorners(!this.rounded); - this.rounded = true; + if (this.map) { + //size has changed - must redo corners + this.setRicoCorners(!this.rounded); + this.rounded = true; + } } },