changed default (when svg_attributes doesn't have a height/width) to the szx and szy constructed from path bounding boxes
@DerVedro was there a reason you thought the default should be 100% (beyond that being the current behavior -- which I see as a bug)?pull/18/head
parent
88185419f5
commit
d8dfbd01fc
|
@ -278,8 +278,8 @@ def disvg(paths=None, colors=None,
|
|||
|
||||
# Create an SVG file
|
||||
if svg_attributes:
|
||||
szx = svg_attributes.get("width", "100%")
|
||||
szy = svg_attributes.get("height", "100%")
|
||||
szx = svg_attributes.get("width", szx)
|
||||
szy = svg_attributes.get("height", szy)
|
||||
dwg = Drawing(filename=filename, size=(szx, szy), **svg_attributes)
|
||||
else:
|
||||
dwg = Drawing(filename=filename, size=(szx, szy), viewBox=viewbox)
|
||||
|
|
Loading…
Reference in New Issue