aboutsummaryrefslogtreecommitdiffstats
path: root/src/element.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-31 14:43:26 +0100
committerwout <wout@impinc.co.uk>2012-12-31 14:43:26 +0100
commit8dbe3599dd9b80738c4124f7e71bc12e763c50dc (patch)
tree97b9d3a3c85ae2cabd17702b74388f219accb2ef /src/element.js
parentf210affa28f5ad2a92a12d8ca17c7ae6083b1d98 (diff)
downloadsvg.js-8dbe3599dd9b80738c4124f7e71bc12e763c50dc.tar.gz
svg.js-8dbe3599dd9b80738c4124f7e71bc12e763c50dc.zip
Added position()
Diffstat (limited to 'src/element.js')
-rw-r--r--src/element.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/element.js b/src/element.js
index 3f1afa3..a9cd7cd 100644
--- a/src/element.js
+++ b/src/element.js
@@ -43,6 +43,7 @@ SVG.extend(SVG.Element, {
var c,
n = this.node.nodeName;
+ // invoke shape method with shape-specific arguments
c = n == 'rect' ?
this.parent[n](this.attrs.width, this.attrs.height) :
n == 'ellipse' ?
@@ -53,7 +54,11 @@ SVG.extend(SVG.Element, {
this.parent[n](this.content) :
this.parent[n]();
- return c.attr(this.attrs);
+ // copy translations
+ c.trans = this.trans;
+
+ // apply attributes and translations
+ return c.attr(this.attrs).transform({});
},
// remove element