Skip to content

Commit

Permalink
Add viewBox
Browse files Browse the repository at this point in the history
  • Loading branch information
kozakdenys committed Oct 17, 2024
1 parent 08a95ce commit ec26837
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/QRSVG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default class QRSVG {
this._element.setAttribute("width", String(options.width));
this._element.setAttribute("height", String(options.height));
this._element.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
this._element.setAttribute("viewBox", `0 0 ${options.width} ${options.height}`);
this._defs = this._window.document.createElementNS("http://www.w3.org/2000/svg", "defs");
this._element.appendChild(this._defs);

Expand Down

0 comments on commit ec26837

Please sign in to comment.