Comment by bryanrasmussen
2 years ago
>This is very annoying if you have common groups of things that interweave with other things visually; but you can’t put them under a single element to select.
I'm not sure I really understand what you're saying, you can put a group of paths etc. under a group element and then manipulate the display of that group. You can't control their z-indexing it's true but I've achieved relatively complex and pleasing interactions with this method.
I guess I see the point that it would be nice to control it, as I normally want to be able to control everything it would be a bit hypocritical to suddenly say no you don't need to, but I would note one benefit of current SVG's approach is you don't end up with the fighting about z-index you get every now and then in HTML where suddenly things overlap and it is hard to figure out in code where or why, in SVG things overlap because one element is above another and are occupying the same x,y.
Say you have a transit map with lines, stops and labels. You always want lines below stops below labels, but that also makes it impossible to group a specific line’s stops and labels together without just totally going on top of a different line’s group. Which then makes interactivity annoying.
thanks, good use case, I tend to use it for aesthetic effects rather than data visualization.