blackears / svgSalamander

158 stars 57 forks source link

no way to replace content of Text element #69

Closed medovina closed 3 years ago

medovina commented 3 years ago

From looking at the svgSalamander source code (i.e. Text.java), I can't see any way that an application can replace the content of a Text element with a new string. There are public methods appendText() and appendTspan() that can append to the content. But it would additionally be very useful to be able to replace the content altogether.

blackears commented 3 years ago

I've added a clearContent() method to Text so that you can remove all text data from it. That should allow you to set your text data.

medovina commented 3 years ago

Great, thanks for the quick fix!