Reputation: 77
I have an SVG in an HTML doc and would like to make it so that when I click on a rectangle it moves to the top layer. The only thing I found for this was this:
return this.parent.removeElement(this).put(this);
but this doesn't work.
Upvotes: 0
Views: 995
Reputation: 124229
You want insertBefore or appendChild instead of removeElement and put
both insertBefore/appendChild remove the element from where it was when they put somewhere else.
Upvotes: 1