[fusion-commits] r2351 - branches/fusion-2.2/lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Mar 29 15:09:28 EDT 2011


Author: madair
Date: 2011-03-29 12:09:28 -0700 (Tue, 29 Mar 2011)
New Revision: 2351

Modified:
   branches/fusion-2.2/lib/MapMessage.js
Log:
re #436: ensure container width is not negative

Modified: branches/fusion-2.2/lib/MapMessage.js
===================================================================
--- branches/fusion-2.2/lib/MapMessage.js	2011-03-29 18:29:16 UTC (rev 2350)
+++ branches/fusion-2.2/lib/MapMessage.js	2011-03-29 19:09:28 UTC (rev 2351)
@@ -105,7 +105,9 @@
 	refreshLayout: function()
 	{
 		// 44 = 2 * padding (10) + 2 * offset(10) + 2 * border (2)
-		this.container.style.width  = this.parentNode.offsetWidth - 44 + "px";
+        var newWidth = this.parentNode.offsetWidth - 44;
+        if (newWidth >= 0)
+            this.container.style.width  = this.parentNode.offsetWidth - 44 + "px";
 	},
 	
 	CLASS_NAME: "Fusion.MapMessage"



More information about the fusion-commits mailing list