| CODENOTIFIER | HelpYou are not signed inSign in |
Project: dojo
Revision: 15161
Author: elazutkin
Date: 07 Sep 2008 20:18:28
Diff at Trac: http://trac.dojotoolkit.org/changeset/15161
Changes:gfx: allow to use an array as a shortcut for a stroke, the array will be
treated as a color definition. Refs #7522. !strict
| ... | ...@@ -131,7 +131,7 @@ | |
| 131 | 131 | return this; |
| 132 | 132 | } |
| 133 | 133 | // normalize the stroke |
| 134 | if(typeof stroke == "string"){ | |
| 134 | if(typeof stroke == "string" || dojo.isArray(stroke)){ | |
| 135 | 135 | stroke = {color: stroke}; |
| 136 | 136 | } |
| 137 | 137 | var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke); |
| ... | ...@@ -158,7 +158,7 @@ | |
| 158 | 158 | return this; |
| 159 | 159 | } |
| 160 | 160 | // normalize the stroke |
| 161 | if(typeof stroke == "string"){ | |
| 161 | if(typeof stroke == "string" || dojo.isArray(stroke)){ | |
| 162 | 162 | stroke = {color: stroke}; |
| 163 | 163 | } |
| 164 | 164 | var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke); |
| ... | ...@@ -106,7 +106,7 @@ | |
| 106 | 106 | return this; |
| 107 | 107 | } |
| 108 | 108 | // normalize the stroke |
| 109 | if(typeof stroke == "string"){ | |
| 109 | if(typeof stroke == "string" || dojo.isArray(stroke)){ | |
| 110 | 110 | stroke = {color: stroke}; |
| 111 | 111 | } |
| 112 | 112 | var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke); |
| ... | ...@@ -193,7 +193,7 @@ | |
| 193 | 193 | return this; // self |
| 194 | 194 | } |
| 195 | 195 | // normalize the stroke |
| 196 | if(typeof stroke == "string"){ | |
| 196 | if(typeof stroke == "string" || dojo.isArray(stroke)){ | |
| 197 | 197 | stroke = {color: stroke}; |
| 198 | 198 | } |
| 199 | 199 | var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke); |