[Mapbender-commits] r4905 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Nov 3 05:11:42 EST 2009


Author: christoph
Date: 2009-11-03 05:11:41 -0500 (Tue, 03 Nov 2009)
New Revision: 4905

Modified:
   trunk/mapbender/http/classes/class_element.php
Log:
set width and height individually

added px suffix

Modified: trunk/mapbender/http/classes/class_element.php
===================================================================
--- trunk/mapbender/http/classes/class_element.php	2009-11-03 10:05:45 UTC (rev 4904)
+++ trunk/mapbender/http/classes/class_element.php	2009-11-03 10:11:41 UTC (rev 4905)
@@ -204,12 +204,14 @@
 			$openTag .= " style = '";
 			if ($this->top != "" && $this->left != "") {
 				$openTag .= "position:absolute;" .
-						 "left:" . $this->left . ";" .
-						 "top:" . $this->top . ";";
+						 "left:" . $this->left . "px;" .
+						 "top:" . $this->top . "px;";
 			}
-			if ($this->width != "" && $this->height != "") {
-				$openTag .= "width:" . $this->width . ";" .
-						 "height:" . $this->height . ";";
+			if ($this->width !== "") {
+				$openTag .= "width:" . $this->width . "px;";
+			} 
+			if ($this->height !== "") {
+				$openTag .= "height:" . $this->height . "px;";
 			}
 			if ($this->zIndex) {
 		    	$openTag .= "z-index:" . $this->zIndex . ";";



More information about the Mapbender_commits mailing list