svgutil: Make detection of view port a bit more robust

This commit is contained in:
Florian Festi 2017-08-20 19:56:33 +02:00
parent 592fbe95c4
commit ddcf13bf6c
1 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,12 @@ class SVGFile(object):
# minx = 10*int(self.minx//10)-10
# as we don't rewrite the left border keep it as 0
self.minx = self.minx or 0
self.miny = self.miny or 0
self.maxx = self.maxx or (self.minx + 10)
self.maxy = self.maxy or (self.miny + 10)
if 0 <= self.minx <= 50:
minx = 0
else: