watermark-js-plus 1.5.5 → 1.5.6

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * watermark-js-plus v1.5.5
2
+ * watermark-js-plus v1.5.6
3
3
  * (c) 2022-2024 Michael Sun
4
4
  * Released under the MIT License.
5
5
  */
@@ -3771,7 +3771,10 @@ var WatermarkCanvas = /** @class */ (function () {
3771
3771
  throw new Error('get context error');
3772
3772
  }
3773
3773
  ctx.restore();
3774
+ ctx.resetTransform();
3774
3775
  ctx.clearRect(0, 0, canvas.width, canvas.height);
3776
+ var ratio = window.devicePixelRatio || 1;
3777
+ ctx.setTransform(ratio, 0, 0, ratio, 0, 0);
3775
3778
  };
3776
3779
  WatermarkCanvas.prototype.getCanvas = function () {
3777
3780
  return this.canvas;