Add support for 'px' on Length in iOS

This commit is contained in:
Panayot Cankov
2017-03-06 13:19:57 +02:00
parent b45cbe929b
commit 9f1ebc11ca
10 changed files with 37 additions and 31 deletions

View File

@@ -45,11 +45,11 @@ export class HtmlView extends HtmlViewBase {
}
let nativeSize = nativeView.sizeThatFits(CGSizeMake(width, height));
let labelWidth = nativeSize.width;
let labelWidth = layout.toDevicePixels(nativeSize.width);
labelWidth = Math.min(labelWidth, width);
let measureWidth = Math.max(labelWidth, this.effectiveMinWidth);
let measureHeight = Math.max(nativeSize.height, this.effectiveMinHeight);
let measureHeight = Math.max(layout.toDevicePixels(nativeSize.height), this.effectiveMinHeight);
let widthAndState = View.resolveSizeAndState(measureWidth, width, widthMode, 0);
let heightAndState = View.resolveSizeAndState(measureHeight, height, heightMode, 0);