parent
f62a9ba077
commit
74a574532a
|
@ -119,10 +119,8 @@ export struct ImageKnifeComponent {
|
|||
}
|
||||
this.pixelMap = pixelMap
|
||||
if (typeof this.pixelMap !== 'string') {
|
||||
let info =await this.pixelMap.getImageInfo()
|
||||
//图片自适应处理
|
||||
if (this.imageKnifeOption.objectFit === ImageFit.Auto) {
|
||||
|
||||
let info =await this.pixelMap.getImageInfo()
|
||||
this.adaptiveWidth = this.currentWidth
|
||||
this.adaptiveHeight = info.size.height * this.currentWidth / info.size.width
|
||||
|
||||
|
|
Loading…
Reference in New Issue