You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case of multiple SVG elements layered on top of each other, the order is important. Currently, the elements are stored inside the Svg class as a HashSet. It should be a LinkedHashSet instead.
`public class Svg extends Component implements HasSize, HasStyle {
private static final long serialVersionUID = 4669224429512601365L;
private static final Logger log = Logger.getLogger(Svg.class.getName());
private Set<SvgElement> svgElements = new HashSet<>(); // this should be a LinkedHashSet
...
}`
The text was updated successfully, but these errors were encountered:
As I look at the code the SvgElement is immediatly added to the SVG DOM if you call Svg.add(element). The privately hold Hashset is only hold/used as lookup. So order should be preserved on client side.
I used this set to regenerate the svg server-side because I needed to manipulate and export the svg in multiple formats (png, pdf, jpg). I know the original scope of the HashSet was limited, but this is a case where the order is important. I solved my problem by extending the svg class, but it would have been nice not to have to.
In the case of multiple SVG elements layered on top of each other, the order is important. Currently, the elements are stored inside the Svg class as a HashSet. It should be a LinkedHashSet instead.
`public class Svg extends Component implements HasSize, HasStyle {
}`
The text was updated successfully, but these errors were encountered: