Skip to content

Commit

Permalink
Merge pull request #411 from sampriddy/svg-viewbox-export-fix
Browse files Browse the repository at this point in the history
Set SVG viewBox size from canvas width and height without factoring by devicePixelDensity
  • Loading branch information
szimek authored Jun 15, 2021
2 parents cde6cb9 + d75ad2c commit 8969bbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/signature_pad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ export default class SignaturePad {
'<svg' +
' xmlns="http://www.w3.org/2000/svg"' +
' xmlns:xlink="http://www.w3.org/1999/xlink"' +
` viewBox="${minX} ${minY} ${maxX} ${maxY}"` +
` viewBox="${minX} ${minY} ${this.canvas.width} ${this.canvas.height}"` +
` width="${maxX}"` +
` height="${maxY}"` +
'>';
Expand Down

0 comments on commit 8969bbc

Please sign in to comment.