mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix iOS image scaling to work in px
This commit is contained in:
@@ -53,8 +53,8 @@ export class Image extends ImageBase {
|
||||
let height = layout.getMeasureSpecSize(heightMeasureSpec);
|
||||
let heightMode = layout.getMeasureSpecMode(heightMeasureSpec);
|
||||
|
||||
let nativeWidth = this.imageSource ? this.imageSource.width : 0;
|
||||
let nativeHeight = this.imageSource ? this.imageSource.height : 0;
|
||||
let nativeWidth = this.imageSource ? layout.toDevicePixels(this.imageSource.width) : 0;
|
||||
let nativeHeight = this.imageSource ? layout.toDevicePixels(this.imageSource.height) : 0;
|
||||
|
||||
let measureWidth = Math.max(nativeWidth, this.effectiveMinWidth);
|
||||
let measureHeight = Math.max(nativeHeight, this.effectiveMinHeight);
|
||||
|
||||
Reference in New Issue
Block a user