summaryrefslogtreecommitdiffstats
path: root/src/element.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/element.js')
-rw-r--r--src/element.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/element.js b/src/element.js
index 3425b81..e6a7cd7 100644
--- a/src/element.js
+++ b/src/element.js
@@ -157,10 +157,14 @@ SVG.extend(SVG.Element, {
else if (a == 'stroke')
this._stroke = v
- /* ensure hex color */
+ /* ensure full hex color */
if (SVG.Color.test(v) || SVG.Color.isRgb(v))
v = new SVG.Color(v)
+ /* parse array values */
+ else if (Array.isArray(v))
+ v = new SVG.Array(v)
+
/* set give attribute on node */
n != null ?
this.node.setAttributeNS(n, a, v.toString()) :