diff options
author | wout <wout@impinc.co.uk> | 2013-07-04 10:02:01 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-07-04 10:02:01 +0100 |
commit | 794f0defea662d94df8880e1e111e47de9f81621 (patch) | |
tree | d155c2e6ea694b53542e87fd0828f38c9e41ff9b /src/element.js | |
parent | dfa7123fb64bc13d2ce37b7f3e3be92db7f7fef8 (diff) | |
download | svg.js-794f0defea662d94df8880e1e111e47de9f81621.tar.gz svg.js-794f0defea662d94df8880e1e111e47de9f81621.zip |
Various IE9 and IE10 fixes
Diffstat (limited to 'src/element.js')
-rw-r--r-- | src/element.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/element.js b/src/element.js index 3337df8..3425b81 100644 --- a/src/element.js +++ b/src/element.js @@ -159,12 +159,12 @@ SVG.extend(SVG.Element, { /* ensure hex color */ if (SVG.Color.test(v) || SVG.Color.isRgb(v)) - v = new SVG.Color(v).toHex() + v = new SVG.Color(v) /* set give attribute on node */ n != null ? - this.node.setAttributeNS(n, a, v) : - this.node.setAttribute(a, v) + this.node.setAttributeNS(n, a, v.toString()) : + this.node.setAttribute(a, v.toString()) /* if the passed argument belongs in the style as well, add it there */ if (this._isStyle(a)) { @@ -214,11 +214,11 @@ SVG.extend(SVG.Element, { /* compile matrix */ this.trans.matrix = this.trans.a - + ',' + this.trans.b - + ',' + this.trans.c - + ',' + this.trans.d - + ',' + this.trans.e - + ',' + this.trans.f + + ' ' + this.trans.b + + ' ' + this.trans.c + + ' ' + this.trans.d + + ' ' + this.trans.e + + ' ' + this.trans.f /* alias current transformations */ o = this.trans @@ -229,11 +229,11 @@ SVG.extend(SVG.Element, { /* add rotation */ if (o.rotation != 0) - transform.push('rotate(' + o.rotation + ',' + (o.cx == null ? this.bbox().cx : o.cx) + ',' + (o.cy == null ? this.bbox().cy : o.cy) + ')') + transform.push('rotate(' + o.rotation + ' ' + (o.cx == null ? this.bbox().cx : o.cx) + ' ' + (o.cy == null ? this.bbox().cy : o.cy) + ')') /* add scale */ if (o.scaleX != 1 || o.scaleY != 1) - transform.push('scale(' + o.scaleX + ',' + o.scaleY + ')') + transform.push('scale(' + o.scaleX + ' ' + o.scaleY + ')') /* add skew on x axis */ if (o.skewX != 0) @@ -245,11 +245,11 @@ SVG.extend(SVG.Element, { /* add translation */ if (o.x != 0 || o.y != 0) - transform.push('translate(' + o.x / o.scaleX + ',' + o.y / o.scaleY + ')') + transform.push('translate(' + o.x / o.scaleX + ' ' + o.y / o.scaleY + ')') /* add offset translation */ - if (this._offset) - transform.push('translate(' + (-this._offset.x) + ',' + (-this._offset.y) + ')') + if (this._offset && this._offset.x != 0 && this._offset.y != 0) + transform.push('translate(' + (-this._offset.x) + ' ' + (-this._offset.y) + ')') /* update transformations, even if there are none */ if (transform.length == 0) |