Fix iOS image scaling to work in px

This commit is contained in:
Panayot Cankov
2017-03-09 10:58:56 +02:00
parent 0b4e38acab
commit aac9cc2e3e
6 changed files with 4 additions and 4 deletions

View File

@@ -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);