Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could use <g> tags for this, e.g.

<svg> <g id="z-order-0"></g> <g id="z-order-1"></g> <g id="z-order-2"></g> </g>

Then you can change the z-order by moving the element to the appropriate group. Elements are rendered in the order of an inorder traversal which is why this works.



I like this -- I'm sure there's some annoying corner cases, but at first glance I think it covers most of the use cases I've worried about. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: