Skip to content

Commit 3659b0c

Browse files
committed
set svg viewBox
1 parent 5cf3bfd commit 3659b0c

File tree

1 file changed

+1
-0
lines changed
  • src/drawing/backend_impl

1 file changed

+1
-0
lines changed

src/drawing/backend_impl/svg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ impl<'a> SVGBackend<'a> {
124124
&[
125125
("width", &format!("{}", size.0)),
126126
("height", &format!("{}", size.1)),
127+
("viewBox", &format!("0 0 {} {}", size.0, size.1)),
127128
("xmlns", "http://www.w3.org/2000/svg"),
128129
],
129130
false,

0 commit comments

Comments
 (0)