@leafer-ui/image 1.11.2 → 1.12.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/image",
3
- "version": "1.11.2",
3
+ "version": "1.12.1",
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": "1.11.2",
26
- "@leafer-ui/draw": "1.11.2"
25
+ "@leafer/core": "1.12.1",
26
+ "@leafer-ui/draw": "1.12.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@leafer/interface": "1.11.2",
30
- "@leafer-ui/interface": "1.11.2"
29
+ "@leafer/interface": "1.12.1",
30
+ "@leafer-ui/interface": "1.12.1"
31
31
  }
32
32
  }
package/src/check.ts CHANGED
@@ -17,7 +17,7 @@ export function checkImage(paint: ILeafPaint, drawImage: boolean, ui: IUI, canva
17
17
  if (data.repeat) {
18
18
  drawImage = false
19
19
  } else if (!((originPaint as IImagePaint).changeful || (Platform.name === 'miniapp' && ResizeEvent.isResizing(ui)) || exporting)) { // 小程序resize过程中直接绘制原图(绕过垃圾回收bug)
20
- drawImage = Platform.image.isLarge(image, scaleX, scaleY)
20
+ drawImage = Platform.image.isLarge(image, scaleX, scaleY) || image.width * scaleX > 8096 || image.height * scaleY > 8096 // 大长图单边超过8096生成pattern会有问题
21
21
  }
22
22
  }
23
23
 
package/src/recycle.ts CHANGED
@@ -20,7 +20,7 @@ export function recycleImage(attrName: IPaintAttr, data: IUIData): IBooleanMap {
20
20
  if (url) {
21
21
  if (!recycleMap) recycleMap = {}
22
22
  recycleMap[url] = true
23
- ImageManager.recycle(image)
23
+ ImageManager.recyclePaint(paint)
24
24
 
25
25
  // stop load
26
26
  if (image.loading) {