@liquid-js/qr-code-styling 5.0.0-1 → 5.0.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -991,14 +991,19 @@ let QRCodeStyling$1 = class {
991
991
  this.options.imageOptions.mode == ImageMode.background && this.options.shape != ShapeType.circle && (count += 2),
992
992
  (count = Math.ceil((this.options.shape == ShapeType.circle ? Math.sqrt(2) : 1) * count)) % 2 == 0 && --count;
993
993
  var margin = this.options.backgroundOptions && this.options.backgroundOptions.margin || 0;
994
- this.options.imageOptions.mode == ImageMode.background && (margin += this.options.imageOptions.margin || 0),
995
- count = Math.ceil(this.options.dotsOptions.size * (count + 2 * margin)), this.qrSVG = new QRSVG({
994
+ this.options.imageOptions.mode == ImageMode.background && (margin += this.options.imageOptions.margin || 0);
995
+ var size = Math.ceil(this.options.dotsOptions.size * (count + 2 * margin));
996
+ this.qrSVG = new QRSVG({
996
997
  ...this.options,
997
- width: count,
998
- height: count,
998
+ width: size,
999
+ height: size,
999
1000
  errorCorrectionPercent: ErrorCorrectionPercents[this.options.qrOptions.errorCorrectionLevel]
1000
1001
  }), this.svgDrawingPromise = this.qrSVG.drawQR(this.qr).then(() => {
1001
- this.qrSVG?.element && this.extension?.(this.qrSVG.element, this.options);
1002
+ this.qrSVG?.element && this.extension?.(this.qrSVG.element, {
1003
+ ...this.options,
1004
+ width: size,
1005
+ height: size
1006
+ });
1002
1007
  });
1003
1008
  }
1004
1009
  }