diff options
author | wout <wout@impinc.co.uk> | 2013-04-14 17:21:42 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-04-14 17:21:42 +0100 |
commit | 801a9e1bfb6ff2fb31d00f9bc71b9af1175395bb (patch) | |
tree | a1b0fa180ae0752cb8f0dc7b69aab693e5708617 /src/element.js | |
parent | 874a935d7bff9647d7e459dc18e0dce2996d0455 (diff) | |
download | svg.js-801a9e1bfb6ff2fb31d00f9bc71b9af1175395bb.tar.gz svg.js-801a9e1bfb6ff2fb31d00f9bc71b9af1175395bb.zip |
Fix in defaults
Diffstat (limited to 'src/element.js')
-rw-r--r-- | src/element.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/element.js b/src/element.js index fcf8f3c..efcd2e3 100644 --- a/src/element.js +++ b/src/element.js @@ -254,7 +254,10 @@ SVG.extend(SVG.Element, { transform.push('translate(' + (-this._offset.x) + ',' + (-this._offset.y) + ')') /* update transformations, even if there are none */ - this.node.setAttribute('transform', transform.join(' ')) + if (transform.length == 0) + this.node.removeAttribute('transform') + else + this.node.setAttribute('transform', transform.join(' ')) return this } |