summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-07-04 10:02:01 +0100
committerwout <wout@impinc.co.uk>2013-07-04 10:02:01 +0100
commit794f0defea662d94df8880e1e111e47de9f81621 (patch)
treed155c2e6ea694b53542e87fd0828f38c9e41ff9b /src
parentdfa7123fb64bc13d2ce37b7f3e3be92db7f7fef8 (diff)
downloadsvg.js-794f0defea662d94df8880e1e111e47de9f81621.tar.gz
svg.js-794f0defea662d94df8880e1e111e47de9f81621.zip
Various IE9 and IE10 fixes
Diffstat (limited to 'src')
-rw-r--r--src/clip.js2
-rw-r--r--src/default.js2
-rw-r--r--src/doc.js2
-rw-r--r--src/element.js26
-rw-r--r--src/mask.js2
5 files changed, 17 insertions, 17 deletions
diff --git a/src/clip.js b/src/clip.js
index 2b4afce..54f9d37 100644
--- a/src/clip.js
+++ b/src/clip.js
@@ -36,7 +36,7 @@ SVG.extend(SVG.Element, {
this.clipper.targets.push(this)
/* apply mask */
- return this.attr('clip-path', 'url(#' + this.clipper.attr('id') + ')')
+ return this.attr('clip-path', 'url("#' + this.clipper.attr('id') + '")')
}
// Unclip element
, unclip: function() {
diff --git a/src/default.js b/src/default.js
index 344fa6e..e8eeecd 100644
--- a/src/default.js
+++ b/src/default.js
@@ -1,7 +1,7 @@
SVG.defaults = {
// Default matrix
- matrix: '1,0,0,1,0,0'
+ matrix: '1 0 0 1 0 0'
// Default attribute values
, attrs: {
diff --git a/src/doc.js b/src/doc.js
index 65545eb..98ba91d 100644
--- a/src/doc.js
+++ b/src/doc.js
@@ -53,7 +53,7 @@ SVG.extend(SVG.Doc, {
element.style('position:absolute;')
setTimeout(function() {
/* set position back to relative */
- element.style('position:relative;')
+ element.style('position:relative;overflow:hidden;')
/* remove temporary wrapper */
element.parent.removeChild(element.node.parentNode)
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)
diff --git a/src/mask.js b/src/mask.js
index 6ebccdc..2aa53d7 100644
--- a/src/mask.js
+++ b/src/mask.js
@@ -36,7 +36,7 @@ SVG.extend(SVG.Element, {
this.masker.targets.push(this)
/* apply mask */
- return this.attr('mask', 'url(#' + this.masker.attr('id') + ')')
+ return this.attr('mask', 'url("#' + this.masker.attr('id') + '")')
}
// Unmask element
, unmask: function() {