var canvas = SVG().addTo('#canvas').size('100%', '100%')
g = canvas.group()
g.add(canvas.rect(100, 100).move(50,50).fill('red'))
canvas.rect(100, 100).move(100, 100).fill('blue')
g.ungroup()
Explanation
Ungrouping g brings the red square to the front, because it is inserted after the blue square. I would expect ungrouped nodes to be inserted at the position of the original group.
Bug report
Fiddle
https://jsfiddle.net/3rof824w/
Explanation
Ungrouping
g
brings the red square to the front, because it is inserted after the blue square. I would expect ungrouped nodes to be inserted at the position of the original group.