Skip to content

Commit

Permalink
Fix viewBox padding calc
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanchuan committed Sep 14, 2023
1 parent 94228d1 commit 0389b44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generator/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function transformViewBox(token) {
}
let [x, y, w, h] = viewBox;
if (p) {
[x, y, w, h] = [x-p, x-p, w+p*2, h+p*2];
[x, y, w, h] = [x-p, y-p, w+p*2, h+p*2];
}
return `${x} ${y} ${w} ${h}`;
}
Expand Down

0 comments on commit 0389b44

Please sign in to comment.