diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-07-30 16:03:27 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-07-30 16:03:27 -0400 |
| commit | 5f14617a029060416fcaea8247c29aa326f4b77f (patch) | |
| tree | 67ccc5e12ab3fb663a133b2399ada0120bf45c3b /lib/svg | |
| parent | 8d41d0f9af0e5390dacdfa2a18e213955aef8ddf (diff) | |
choose better rung positions
Diffstat (limited to 'lib/svg')
| -rw-r--r-- | lib/svg/path.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/svg/path.py b/lib/svg/path.py index 00e2c269..52144332 100644 --- a/lib/svg/path.py +++ b/lib/svg/path.py @@ -15,8 +15,10 @@ def get_node_transform(node): # start with the identity transform transform = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]] - # combine this node's transform with all parent groups' transforms - transform = simpletransform.composeParents(node, transform) + # this if is because sometimes inkscape likes to create paths outside of a layer?! + if node.getparent() is not None: + # combine this node's transform with all parent groups' transforms + transform = simpletransform.composeParents(node, transform) # add in the transform implied by the viewBox viewbox_transform = get_viewbox_transform(node.getroottree().getroot()) |
