[Dojo-checkins] elazutkin - r15162 - dojox/trunk/gfx

dojo-checkins-admin at dojotoolkit.org dojo-checkins-admin at dojotoolkit.org
Mon Sep 8 00:23:53 UTC 2008


Author: elazutkin
Date: Sun Sep  7 17:23:50 2008
New Revision: 15162

Modified:
   dojox/trunk/gfx/shape.js
   dojox/trunk/gfx/silverlight.js
   dojox/trunk/gfx/svg.js
   dojox/trunk/gfx/vml.js
Log:
gfx: allow to use a dojo.Color as a shortcut for a stroke. Fixes #7522. !strict


Modified: dojox/trunk/gfx/shape.js
==============================================================================
--- dojox/trunk/gfx/shape.js	(original)
+++ dojox/trunk/gfx/shape.js	Sun Sep  7 17:23:50 2008
@@ -193,7 +193,7 @@
 			return this;	// self
 		}
 		// normalize the stroke
-		if(typeof stroke == "string" || dojo.isArray(stroke)){
+		if(typeof stroke == "string" || dojo.isArray(stroke) || stroke instanceof dojo.Color){
 			stroke = {color: stroke};
 		}
 		var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);

Modified: dojox/trunk/gfx/silverlight.js
==============================================================================
--- dojox/trunk/gfx/silverlight.js	(original)
+++ dojox/trunk/gfx/silverlight.js	Sun Sep  7 17:23:50 2008
@@ -131,7 +131,7 @@
 			return this;
 		}
 		// normalize the stroke
-		if(typeof stroke == "string" || dojo.isArray(stroke)){
+		if(typeof stroke == "string" || dojo.isArray(stroke) || stroke instanceof dojo.Color){
 			stroke = {color: stroke};
 		}
 		var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);

Modified: dojox/trunk/gfx/svg.js
==============================================================================
--- dojox/trunk/gfx/svg.js	(original)
+++ dojox/trunk/gfx/svg.js	Sun Sep  7 17:23:50 2008
@@ -106,7 +106,7 @@
 			return this;
 		}
 		// normalize the stroke
-		if(typeof stroke == "string" || dojo.isArray(stroke)){
+		if(typeof stroke == "string" || dojo.isArray(stroke) || stroke instanceof dojo.Color){
 			stroke = {color: stroke};
 		}
 		var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);

Modified: dojox/trunk/gfx/vml.js
==============================================================================
--- dojox/trunk/gfx/vml.js	(original)
+++ dojox/trunk/gfx/vml.js	Sun Sep  7 17:23:50 2008
@@ -158,7 +158,7 @@
 			return this;
 		}
 		// normalize the stroke
-		if(typeof stroke == "string" || dojo.isArray(stroke)){
+		if(typeof stroke == "string" || dojo.isArray(stroke) || stroke instanceof dojo.Color){
 			stroke = {color: stroke};
 		}
 		var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);


More information about the Dojo-checkins mailing list