svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
11.04k stars 1.08k forks source link

When cloned, a custom element looses it's constructor class and it's custom methods #1154

Closed Laurent-Chouinard closed 1 year ago

Laurent-Chouinard commented 3 years ago

Bug report

Fiddle

https://jsfiddle.net/say37z8m/2/

Explanation

Should I write a custom clone method then? I don't know how to write one that works. my custom cloning introduces a problem with the tree model in the parent/children relationship

Thank you so much for this great library.

Fuzzyma commented 3 years ago

Wow good catch! I fixed it in master :)

Also: Great fiddle!

PS: Congratulation on your first issue and welcome to GitHub!