When adding graphics to a GraphicsLayer, I noticed that all my Graphics using a SimpleFillSymbol (i.e. polygon geometry) are bunched together in a single SVG <g> element. My other graphics using SimpleLineSymbol (i.e. polyline geometry) or TextSymbol are added separately in their own <path> and <text> elements, respectively.
I'm not sure if the API does intentionally or not, maybe for some sort of performance reason. If so, I'm wondering if this can be avoided because it really messes with my graphics ordering. In our webapp users should be able to edit and manipulate graphics ordering, but this <path> grouping into a single <g> seems to make it impossible, since all graphics using SimpleFillSymbol will have their own order v.s. all other Graphics.
See below screenshot for example, where I drew 3 shapes along with a bunch of text measures for those shapes. You can see that all the TextSymbol are drawn above all the shapes, regardless of the order I added them to the layer.
Any way to add them as simple <path> elements like the Graphics using SimpleLineSymbol?