[Dojo-checkins] pruzand - r27012 - dojox/trunk/gfx

dojo-checkins-admin at dojotoolkit.org dojo-checkins-admin at dojotoolkit.org
Thu Nov 10 12:33:04 EST 2011


Author: pruzand
Date: Thu Nov 10 09:33:04 2011
New Revision: 27012

Modified:
   dojox/trunk/gfx/vml.js
Log:
fixes #13775 ensures positive width/height. thx ktiedt (cla)

Modified: dojox/trunk/gfx/vml.js
==============================================================================
--- dojox/trunk/gfx/vml.js	(original)
+++ dojox/trunk/gfx/vml.js	Thu Nov 10 09:33:04 2011
@@ -392,8 +392,8 @@
 			var style = this.rawNode.style;
 			style.left   = shape.x.toFixed();
 			style.top    = shape.y.toFixed();
-			style.width  = (typeof shape.width == "string" && shape.width.indexOf("%") >= 0)  ? shape.width  : shape.width.toFixed();
-			style.height = (typeof shape.height == "string" && shape.height.indexOf("%") >= 0) ? shape.height : shape.height.toFixed();
+			style.width  = (typeof shape.width == "string" && shape.width.indexOf("%") >= 0)  ? shape.width  : Math.max(shape.width.toFixed(),0);
+			style.height = (typeof shape.height == "string" && shape.height.indexOf("%") >= 0) ? shape.height : Math.max(shape.height.toFixed(),0);
 			// set all necessary styles, which are lost by VML (yes, it's a VML's bug)
 			return this.setTransform(this.matrix).setFill(this.fillStyle).setStroke(this.strokeStyle);	// self
 		}


More information about the Dojo-checkins mailing list