aboutsummaryrefslogtreecommitdiffstats
path: root/src/element.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-01-10 13:18:21 +0100
committerwout <wout@impinc.co.uk>2013-01-10 13:18:21 +0100
commit312084aeb01d2b6cdef6b9743aee65973c6f9526 (patch)
tree8049c60dd93423740fa72fd73486b96602d94180 /src/element.js
parentfac8f88f9f88499abe7a8197fec8c48a3457fdf0 (diff)
downloadsvg.js-312084aeb01d2b6cdef6b9743aee65973c6f9526.tar.gz
svg.js-312084aeb01d2b6cdef6b9743aee65973c6f9526.zip
Bug fix in clone() method
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 933002a..7da6e25 100644
--- a/src/element.js
+++ b/src/element.js
@@ -65,6 +65,7 @@ SVG.extend(SVG.Element, {
if (this instanceof SVG.Wrap) {
/* build new wrapped shape */
clone = this.parent[this.child.node.nodeName]();
+ clone.attrs = this.attrs;
/* copy child attributes and transformations */
clone.child.trans = this.child.trans;
@@ -85,13 +86,15 @@ SVG.extend(SVG.Element, {
name == 'g' ?
this.parent.group() :
this.parent[name]();
+
+ clone.attr(this.attrs);
}
/* copy transformations */
clone.trans = this.trans;
/* apply attributes and translations */
- return clone.attr(this.attrs).transform({});
+ return clone.transform({});
},
// Remove element
remove: function() {