@leafer-ui/image 2.0.3 → 2.0.4

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/package.json +5 -5
  2. package/src/check.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/image",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "@leafer-ui/image",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "2.0.3",
26
- "@leafer-ui/draw": "2.0.3"
25
+ "@leafer/core": "2.0.4",
26
+ "@leafer-ui/draw": "2.0.4"
27
27
  },
28
28
  "devDependencies": {
29
- "@leafer/interface": "2.0.3",
30
- "@leafer-ui/interface": "2.0.3"
29
+ "@leafer/interface": "2.0.4",
30
+ "@leafer-ui/interface": "2.0.4"
31
31
  }
32
32
  }
package/src/check.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ILeaferCanvas, IRenderOptions, IScaleData } from '@leafer/interface'
2
- import { Platform, ResizeEvent } from '@leafer/core'
2
+ import { Platform } from '@leafer/core'
3
3
 
4
4
  import { IUI, ILeafPaint, IImagePaint } from '@leafer-ui/interface'
5
5
  import { PaintImage } from "@leafer-ui/draw"
@@ -16,7 +16,7 @@ export function checkImage(paint: ILeafPaint, drawImage: boolean, ui: IUI, canva
16
16
  if (drawImage) {
17
17
  if (data.repeat) {
18
18
  drawImage = false
19
- } else if (!((originPaint as IImagePaint).changeful || paint.film || (Platform.name === 'miniapp' && ResizeEvent.isResizing(ui)) || exporting)) { // 小程序resize过程中直接绘制原图(绕过垃圾回收bug)
19
+ } else if (!((originPaint as IImagePaint).changeful || paint.film || Platform.name === 'miniapp' || exporting)) { // 小程序直接绘制原图(绕过垃圾回收bug)
20
20
  drawImage = Platform.image.isLarge(image, scaleX, scaleY) || image.width * scaleX > 8096 || image.height * scaleY > 8096 // 非image类型的尽量绘制原图,大长图单边超过8096生成pattern会有问题
21
21
  }
22
22
  }