修复鸿蒙手机调节显示大小时图片消失
Signed-off-by: zenggaofeng <zenggaofeng2@h-partners.com>
This commit is contained in:
parent
f70b96e063
commit
0854025779
|
@ -1,3 +1,6 @@
|
|||
## 2.1.2-rc.6
|
||||
- 修复手机调节显示大小时图片消失
|
||||
|
||||
## 2.1.2-rc.5
|
||||
- moduleContext新增缓存策略,缓存上限5,缓存策略Lru
|
||||
- 适配DevEco Studio 4.1(4.1.3.415)--SDK:API11( 4.1.0.56)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"name": "entry",
|
||||
"description": "example description",
|
||||
"repository": {},
|
||||
"version": "2.1.2-rc.5",
|
||||
"version": "2.1.2-rc.6",
|
||||
"dependencies": {
|
||||
"@ohos/libraryimageknife": "file:../sharedlibrary",
|
||||
"@ohos/sharedlibrary2": "file:../sharedlibrary2",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"main": "index.ets",
|
||||
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
|
||||
"type": "module",
|
||||
"version": "2.1.2-rc.5",
|
||||
"version": "2.1.2-rc.6",
|
||||
"dependencies": {
|
||||
"pako": "^2.1.0",
|
||||
"@ohos/disklrucache": "^2.0.2-rc.0",
|
||||
|
|
|
@ -102,6 +102,8 @@ export struct ImageKnifeComponent {
|
|||
if(newValue != undefined && newValue.width != undefined && newValue.height != undefined) {
|
||||
this.currentWidth = newValue.width as number
|
||||
this.currentHeight = newValue.height as number
|
||||
this.lastWidth = oldValue.width as number
|
||||
this.lastHeight = oldValue.height as number
|
||||
if (this.currentWidth <= 0 || this.currentHeight <= 0) {
|
||||
// 存在宽或者高为0,此次重回无意义,无需进行request请求
|
||||
} else {
|
||||
|
@ -109,8 +111,6 @@ export struct ImageKnifeComponent {
|
|||
if ((this.currentHeight != this.lastHeight || this.currentWidth != this.lastWidth) || this.firstDrawFlag) {
|
||||
this.firstDrawFlag = false;
|
||||
LogUtil.log('ImageKnifeComponent onAreaChange And Next To Execute. Canvas currentWidth =' + this.currentWidth + ' currentHeight=' + this.currentHeight)
|
||||
this.lastWidth = this.currentWidth
|
||||
this.lastHeight = this.currentHeight
|
||||
this.imageKnifeExecute()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"name": "imageknife",
|
||||
"description": "example description",
|
||||
"repository": {},
|
||||
"version": "2.1.2-rc.5",
|
||||
"version": "2.1.2-rc.6",
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue