summaryrefslogtreecommitdiffstats
path: root/src/element.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-03-09 12:30:02 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-03-09 12:30:02 +0100
commit1bcabca97d56f2f8cd94010f1284c4eb2cc2cb8a (patch)
tree290051c5d3144e42386235c501e9b6579cbe5e49 /src/element.js
parent9479d18674745cbf4bfb44e0fdbb0eab3c5bfe06 (diff)
downloadsvg.js-1bcabca97d56f2f8cd94010f1284c4eb2cc2cb8a.tar.gz
svg.js-1bcabca97d56f2f8cd94010f1284c4eb2cc2cb8a.zip
fixed a bug with clone which didnt copy over dom data (#621)
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 d3db4ba..d22e742 100644
--- a/src/element.js
+++ b/src/element.js
@@ -62,7 +62,10 @@ SVG.Element = SVG.invent({
.height(new SVG.Number(p.height))
}
// Clone element
- , clone: function(parent) {
+ , clone: function(parent, withData) {
+ // write dom data to the dom so the clone can pickup the data
+ this.writeDataToDom()
+
// clone element and assign new id
var clone = assignNewId(this.node.cloneNode(true))