summaryrefslogtreecommitdiffstats
path: root/src/element.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/element.js')
-rw-r--r--src/element.js5
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
}