I want to create a simple coloring. I load svg image and I want to color the clicked path element by adding some class to it. How can I interact with path elements from my loaded svg file?
An SVG is converted to a bitmap when it’s loaded, so all the paths are lost.
Thank you for reply! So maybe there is any other approach to create a coloring or I should try to find another framework for that?
Hi @catherine.ish,
The way to get what you want is through DOMElements. For this you have to load the svg file as html and convert it into a DOMElement.
One way to do what you want would be this:
Regards
2 Likes
Thank you so much) I’ll try to do it this way, looks like exactly what I wanted