-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order is Not Preserved #210
Comments
Here's my fix for it:
Note that this includes the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The processing of SVG elements occurs by type (in order: path, polyline, polygon, line, ellipse, circle, and rect) by calling
doc.getElementsByTagName()
for each type. This ends up returning the paths to the caller in a possibly very different order than they were specified in the original SVG file.For simple lines, this typically isn't a problem but if some of those shapes are styled to "fill" then it is a big problem. For example, a rectangle at the bottom (e.g. a base color) will end up on top and obscure everything else.
The text was updated successfully, but these errors were encountered: