diff options
author | wout <wout@impinc.co.uk> | 2013-07-25 13:09:30 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-07-25 13:09:30 +0100 |
commit | 58f10a25dbee327f496eacbf7944a561708de5ea (patch) | |
tree | 89647de589f46d40aaf01258240f8d6ad9390322 /src/element.js | |
parent | 494535622842ac8636a85c485b3057e8aa0dc5a7 (diff) | |
download | svg.js-58f10a25dbee327f496eacbf7944a561708de5ea.tar.gz svg.js-58f10a25dbee327f496eacbf7944a561708de5ea.zip |
Added SVG.Array and bumped to v0.29
Diffstat (limited to 'src/element.js')
-rw-r--r-- | src/element.js | 6 |
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()) : |