@fulate/ui 1.0.5 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3440,7 +3440,10 @@ var Image = class extends Bitmap {
3440
3440
  const pixelRatio = this.renderPixelRatio;
3441
3441
  const needW = Math.ceil((this.width || this.naturalWidth) * pixelRatio);
3442
3442
  const needH = Math.ceil((this.height || this.naturalHeight) * pixelRatio);
3443
- if (needW > this.renderSize.w * UPGRADE_RATIO || needH > this.renderSize.h * UPGRADE_RATIO) this.loadAndProcess();
3443
+ if (needW > this.renderSize.w * UPGRADE_RATIO || needH > this.renderSize.h * UPGRADE_RATIO) {
3444
+ const nextSize = this.calcAutoSize(this.naturalWidth, this.naturalHeight);
3445
+ if (nextSize.w > this.renderSize.w || nextSize.h > this.renderSize.h) this.loadAndProcess();
3446
+ }
3444
3447
  }
3445
3448
  loadHTMLImage(src) {
3446
3449
  return new Promise((resolve, reject) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fulate/ui",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",